add some comments in the solaris unit test
authorYann Rouillard <yann@pleiades.fr.eu.org>
Thu, 23 May 2013 22:40:56 +0000 (00:40 +0200)
committerYann Rouillard <yann@pleiades.fr.eu.org>
Thu, 23 May 2013 22:40:56 +0000 (00:40 +0200)
test/test_solaris_support.py

index 2f488257e7d54aa1352b85131de42405ddf5ac7a..0b7834c24bd423ca6ae6eb62e526cace00686907 100644 (file)
@@ -24,11 +24,17 @@ class TestSolarisSupport(unittest.TestCase):
             syminfo_section = elf.get_section_by_name('.SUNW_syminfo')
             self.assertIsNotNone(syminfo_section)
 
+            # The test files were compiled against libc.so.1 with
+            # direct binding, hence the libc symbols used 
+            # (exit, atexit and _exit) have the direct binding flags
+            # in the syminfo table.
+            # We check that this is properly detected.
             exit_symbols = [s for s in syminfo_section.iter_symbols()
                             if 'exit' in s.name]
             self.assertNotEqual(len(exit_symbols), 0)
 
             for symbol in exit_symbols:
+                # libc.so.1 has the index 0 in the dynamic table
                 self.assertEqual(symbol['si_boundto'], 0)
                 self.assertEqual(symbol['si_flags'],
                                  SYMINFO_FLAGS.SYMINFO_FLG_DIRECT |