Fixed a stupid mistake on SYMINFO name (I should change my terminal font)
authorYann Rouillard <yann@pleiades.fr.eu.org>
Mon, 29 Apr 2013 23:59:27 +0000 (01:59 +0200)
committerYann Rouillard <yann@pleiades.fr.eu.org>
Mon, 29 Apr 2013 23:59:27 +0000 (01:59 +0200)
elftools/elf/constants.py
elftools/elf/descriptions.py
scripts/elfdump.py
test/test_solaris_support.py

index e694293a553a40defd8d4d1ecc902ed254061754..e042ed04da6042be4f3c0799a586061650fdaf74 100644 (file)
@@ -48,7 +48,7 @@ class P_FLAGS(object):
 
 # symbol info flags for entries
 # in the .SUNW_syminfo section
-class SYMINF0_FLAGS(object):
+class SYMINFO_FLAGS(object):
     """ Flags for the si_flags field of entries
         in the .SUNW_syminfo section
     """
index df8972fc017bb44694784b43f03b64cbde5b1be4..2c32b1f71ab919a0c7b1355fad57635fbf7076d8 100644 (file)
@@ -9,7 +9,7 @@
 from .enums import (
     ENUM_D_TAG, ENUM_E_VERSION, ENUM_RELOC_TYPE_i386, ENUM_RELOC_TYPE_x64
     )
-from .constants import P_FLAGS, SH_FLAGS, SYMINF0_FLAGS
+from .constants import P_FLAGS, SH_FLAGS, SYMINFO_FLAGS
 from ..common.py3compat import iteritems
 
 
@@ -87,16 +87,16 @@ def describe_dyn_tag(x):
 def describe_syminfo_flags(x):
     s = ''
     for flag in (
-            SYMINF0_FLAGS.SYMINFO_FLG_DIRECT,
-            SYMINF0_FLAGS.SYMINFO_FLG_DIRECTBIND,
-            SYMINF0_FLAGS.SYMINFO_FLG_COPY,
-            SYMINF0_FLAGS.SYMINFO_FLG_LAZYLOAD,
-            SYMINF0_FLAGS.SYMINFO_FLG_NOEXTDIRECT,
-            SYMINF0_FLAGS.SYMINFO_FLG_AUXILIARY,
-            SYMINF0_FLAGS.SYMINFO_FLG_FILTER,
-            SYMINF0_FLAGS.SYMINFO_FLG_INTERPOSE,
-            SYMINF0_FLAGS.SYMINFO_FLG_CAP,
-            SYMINF0_FLAGS.SYMINFO_FLG_DEFERRED):
+            SYMINFO_FLAGS.SYMINFO_FLG_DIRECT,
+            SYMINFO_FLAGS.SYMINFO_FLG_DIRECTBIND,
+            SYMINFO_FLAGS.SYMINFO_FLG_COPY,
+            SYMINFO_FLAGS.SYMINFO_FLG_LAZYLOAD,
+            SYMINFO_FLAGS.SYMINFO_FLG_NOEXTDIRECT,
+            SYMINFO_FLAGS.SYMINFO_FLG_AUXILIARY,
+            SYMINFO_FLAGS.SYMINFO_FLG_FILTER,
+            SYMINFO_FLAGS.SYMINFO_FLG_INTERPOSE,
+            SYMINFO_FLAGS.SYMINFO_FLG_CAP,
+            SYMINFO_FLAGS.SYMINFO_FLG_DEFERRED):
         s += _DESCR_SYMINFO_FLAGS[flag] if (x & flag) else ''
     return s
 
@@ -253,16 +253,16 @@ _DESCR_ST_SHNDX = dict(
 )
 
 _DESCR_SYMINFO_FLAGS = {
-    SYMINF0_FLAGS.SYMINFO_FLG_DIRECT: 'D',
-    SYMINF0_FLAGS.SYMINFO_FLG_DIRECTBIND: 'B',
-    SYMINF0_FLAGS.SYMINFO_FLG_COPY: 'C',
-    SYMINF0_FLAGS.SYMINFO_FLG_LAZYLOAD: 'L',
-    SYMINF0_FLAGS.SYMINFO_FLG_NOEXTDIRECT: 'N',
-    SYMINF0_FLAGS.SYMINFO_FLG_AUXILIARY: 'A',
-    SYMINF0_FLAGS.SYMINFO_FLG_FILTER: 'F',
-    SYMINF0_FLAGS.SYMINFO_FLG_INTERPOSE: 'I',
-    SYMINF0_FLAGS.SYMINFO_FLG_CAP: 'S',
-    SYMINF0_FLAGS.SYMINFO_FLG_DEFERRED: 'P',
+    SYMINFO_FLAGS.SYMINFO_FLG_DIRECT: 'D',
+    SYMINFO_FLAGS.SYMINFO_FLG_DIRECTBIND: 'B',
+    SYMINFO_FLAGS.SYMINFO_FLG_COPY: 'C',
+    SYMINFO_FLAGS.SYMINFO_FLG_LAZYLOAD: 'L',
+    SYMINFO_FLAGS.SYMINFO_FLG_NOEXTDIRECT: 'N',
+    SYMINFO_FLAGS.SYMINFO_FLG_AUXILIARY: 'A',
+    SYMINFO_FLAGS.SYMINFO_FLG_FILTER: 'F',
+    SYMINFO_FLAGS.SYMINFO_FLG_INTERPOSE: 'I',
+    SYMINFO_FLAGS.SYMINFO_FLG_CAP: 'S',
+    SYMINFO_FLAGS.SYMINFO_FLG_DEFERRED: 'P',
 }
 
 _DESCR_RELOC_TYPE_i386 = dict(
index 853746dc720f0dd12a7bc40005edcf4b5b4c093c..5e7078fc22d694a918bc9af757de88a2bfb4ca90 100755 (executable)
@@ -24,7 +24,7 @@ from elftools.common.py3compat import (
 from elftools.elf.elffile import ELFFile
 from elftools.elf.dynamic import DynamicSection, DynamicSegment
 from elftools.elf.enums import ENUM_D_TAG
-from elftools.elf.constants import SYMINF0_FLAGS
+from elftools.elf.constants import SYMINFO_FLAGS
 from elftools.elf.segments import InterpSegment
 from elftools.elf.sections import SUNWSyminfoTableSection
 from elftools.elf.relocation import RelocationSection
@@ -91,7 +91,7 @@ class Elfdump(object):
                     continue
 
                 index = ''
-                if syminfo['si_flags'] & SYMINF0_FLAGS.SYMINFO_FLG_CAP:
+                if syminfo['si_flags'] & SYMINFO_FLAGS.SYMINFO_FLG_CAP:
                     boundto = '<symbol capabilities>'
                 elif syminfo['si_boundto'] == 0xffff:
                     boundto = '<self>'
index 9ad535c6e42bba20f14a1b89df43d6a4ceebeb9e..2f488257e7d54aa1352b85131de42405ddf5ac7a 100644 (file)
@@ -12,7 +12,7 @@ import os
 
 from utils import setup_syspath; setup_syspath()
 from elftools.elf.elffile import ELFFile
-from elftools.elf.constants import SYMINF0_FLAGS
+from elftools.elf.constants import SYMINFO_FLAGS
 
 
 class TestSolarisSupport(unittest.TestCase):
@@ -31,8 +31,8 @@ class TestSolarisSupport(unittest.TestCase):
             for symbol in exit_symbols:
                 self.assertEqual(symbol['si_boundto'], 0)
                 self.assertEqual(symbol['si_flags'],
-                                 SYMINF0_FLAGS.SYMINFO_FLG_DIRECT |
-                                 SYMINF0_FLAGS.SYMINFO_FLG_DIRECTBIND)
+                                 SYMINFO_FLAGS.SYMINFO_FLG_DIRECT |
+                                 SYMINFO_FLAGS.SYMINFO_FLG_DIRECTBIND)
 
     def test_SUNW_syminfo_section_x86(self):
         self._test_SUNW_syminfo_section_generic('exe_solaris32_cc.elf')