Cosmetic renaming & updated CHANGES file
authorEli Bendersky <eliben@gmail.com>
Sat, 25 May 2013 13:05:19 +0000 (06:05 -0700)
committerEli Bendersky <eliben@gmail.com>
Sat, 25 May 2013 13:05:19 +0000 (06:05 -0700)
CHANGES
elftools/elf/constants.py
elftools/elf/descriptions.py
test/test_solaris_support.py

diff --git a/CHANGES b/CHANGES
index 54e772ce34dd328d3174f148f13a9162f934551c..a67c9b99053bf9d4c02686402a3284bc497a20d1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,12 @@
 Changelog
 =========
 
-+ Version 0.22 (17.04.2013)
++ Version 0.22 (??)
+
+  - Added some initial support for parsing Solaris OpenCSW ELF files
+    (contributed by Yann Rouillard).
+
++ Version 0.21 (17.04.2013)
 
   - Added new example: dwarf_decode_address - decode function name and
     file & line information from an address.
index e042ed04da6042be4f3c0799a586061650fdaf74..8387c0fbefd373f2c259222785d360cb6fdfd052 100644 (file)
@@ -48,7 +48,7 @@ class P_FLAGS(object):
 
 # symbol info flags for entries
 # in the .SUNW_syminfo section
-class SYMINFO_FLAGS(object):
+class SUNW_SYMINFO_FLAGS(object):
     """ Flags for the si_flags field of entries
         in the .SUNW_syminfo section
     """
index 2fb70749d1c80aaf5770139fd5b8b766993c7a92..c1cda6a0dd6faf60f6e9098115d81910c6da8339 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, SYMINFO_FLAGS
+from .constants import P_FLAGS, SH_FLAGS, SUNW_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 (
-            SYMINFO_FLAGS.SYMINFO_FLG_CAP,
-            SYMINFO_FLAGS.SYMINFO_FLG_DIRECT,
-            SYMINFO_FLAGS.SYMINFO_FLG_FILTER,
-            SYMINFO_FLAGS.SYMINFO_FLG_AUXILIARY,
-            SYMINFO_FLAGS.SYMINFO_FLG_DIRECTBIND,
-            SYMINFO_FLAGS.SYMINFO_FLG_COPY,
-            SYMINFO_FLAGS.SYMINFO_FLG_LAZYLOAD,
-            SYMINFO_FLAGS.SYMINFO_FLG_NOEXTDIRECT,
-            SYMINFO_FLAGS.SYMINFO_FLG_INTERPOSE,
-            SYMINFO_FLAGS.SYMINFO_FLG_DEFERRED):
+            SUNW_SYMINFO_FLAGS.SYMINFO_FLG_CAP,
+            SUNW_SYMINFO_FLAGS.SYMINFO_FLG_DIRECT,
+            SUNW_SYMINFO_FLAGS.SYMINFO_FLG_FILTER,
+            SUNW_SYMINFO_FLAGS.SYMINFO_FLG_AUXILIARY,
+            SUNW_SYMINFO_FLAGS.SYMINFO_FLG_DIRECTBIND,
+            SUNW_SYMINFO_FLAGS.SYMINFO_FLG_COPY,
+            SUNW_SYMINFO_FLAGS.SYMINFO_FLG_LAZYLOAD,
+            SUNW_SYMINFO_FLAGS.SYMINFO_FLG_NOEXTDIRECT,
+            SUNW_SYMINFO_FLAGS.SYMINFO_FLG_INTERPOSE,
+            SUNW_SYMINFO_FLAGS.SYMINFO_FLG_DEFERRED):
         s += _DESCR_SYMINFO_FLAGS[flag] if (x & flag) else ''
     return s
 
@@ -256,16 +256,16 @@ _DESCR_ST_SHNDX = dict(
 )
 
 _DESCR_SYMINFO_FLAGS = {
-    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',
+    SUNW_SYMINFO_FLAGS.SYMINFO_FLG_DIRECT: 'D',
+    SUNW_SYMINFO_FLAGS.SYMINFO_FLG_DIRECTBIND: 'B',
+    SUNW_SYMINFO_FLAGS.SYMINFO_FLG_COPY: 'C',
+    SUNW_SYMINFO_FLAGS.SYMINFO_FLG_LAZYLOAD: 'L',
+    SUNW_SYMINFO_FLAGS.SYMINFO_FLG_NOEXTDIRECT: 'N',
+    SUNW_SYMINFO_FLAGS.SYMINFO_FLG_AUXILIARY: 'A',
+    SUNW_SYMINFO_FLAGS.SYMINFO_FLG_FILTER: 'F',
+    SUNW_SYMINFO_FLAGS.SYMINFO_FLG_INTERPOSE: 'I',
+    SUNW_SYMINFO_FLAGS.SYMINFO_FLG_CAP: 'S',
+    SUNW_SYMINFO_FLAGS.SYMINFO_FLG_DEFERRED: 'P',
 }
 
 _DESCR_SYMINFO_BOUNDTO = dict(
index 59084c98b17d0669b64d9ba19da1a06e0fad7e43..9f64efdce2884f80a78d53545d7220ba5ad925ad 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 SYMINFO_FLAGS
+from elftools.elf.constants import SUNW_SYMINFO_FLAGS
 
 
 class TestSolarisSupport(unittest.TestCase):
@@ -37,8 +37,8 @@ class TestSolarisSupport(unittest.TestCase):
                 # 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 |
-                                 SYMINFO_FLAGS.SYMINFO_FLG_DIRECTBIND)
+                                 SUNW_SYMINFO_FLAGS.SYMINFO_FLG_DIRECT |
+                                 SUNW_SYMINFO_FLAGS.SYMINFO_FLG_DIRECTBIND)
 
     def test_SUNW_syminfo_section_x86(self):
         self._test_SUNW_syminfo_section_generic('exe_solaris32_cc.elf')