pyelftools.git
10 years agoAll readelf tests are passing with python 2. some fails with 3 yet in readelf comparisons
Eli Bendersky [Thu, 28 Nov 2013 17:54:41 +0000 (09:54 -0800)]
All readelf tests are passing with python 2. some fails with 3 yet in readelf comparisons

10 years agoexe_simple64 now passes again
Eli Bendersky [Thu, 28 Nov 2013 17:10:22 +0000 (09:10 -0800)]
exe_simple64 now passes again

10 years agoFrom now on, carry a built version of readelf with us
Eli Bendersky [Thu, 28 Nov 2013 17:02:13 +0000 (09:02 -0800)]
From now on, carry a built version of readelf with us

10 years agoSwitch tox's testing Python py32->py33
Eli Bendersky [Wed, 27 Nov 2013 14:54:03 +0000 (06:54 -0800)]
Switch tox's testing Python py32->py33

11 years agoadd support for solaris .SUNW_ldynsym section
Yann Rouillard [Wed, 19 Jun 2013 23:48:38 +0000 (01:48 +0200)]
add support for solaris .SUNW_ldynsym section

11 years agoMerge pull request #6 from kholia/README-update
Eli Bendersky [Wed, 19 Jun 2013 12:46:55 +0000 (05:46 -0700)]
Merge pull request #6 from kholia/README-update

Update instructions for getting the current code

11 years agoUpdate instructions for getting the current code
Dhiru Kholia [Wed, 19 Jun 2013 08:48:18 +0000 (14:18 +0530)]
Update instructions for getting the current code

11 years agoadd support for solaris additional visibility specifications
Yann Rouillard [Sun, 16 Jun 2013 19:05:50 +0000 (21:05 +0200)]
add support for solaris additional visibility specifications
(see http://docs.oracle.com/cd/E19963-01/html/819-0690/chapter6-93046.html#chapter7-27)

11 years agoMerge pull request #4 from yannrouillard/solaris
Eli Bendersky [Sun, 16 Jun 2013 23:21:11 +0000 (16:21 -0700)]
Merge pull request #4 from yannrouillard/solaris

Fix a mistake in symbol visibility description string table

11 years agofix a mistake in symbol visibility description string table
Yann Rouillard [Sun, 16 Jun 2013 18:43:14 +0000 (20:43 +0200)]
fix a mistake in symbol visibility description string table

11 years agosupport parsing of dynamic ELFs w/out section headers
Mike Frysinger [Sun, 9 Jun 2013 22:42:40 +0000 (18:42 -0400)]
support parsing of dynamic ELFs w/out section headers

At runtime, ELFs do not use the section headers at all. Instead, only
the program segments and dynamic tags get used. This means you can
strip the section table completely from an ELF and have it still work.

In practice, people rarely do this, but it's not unheard of. Make the
Dynamic tags work even in these cases by loading the strings table the
same way the runtime loader does:
 * parse the symtab address from DT_STRTAB
 * locate the file offset via the program segments

In order to avoid circular deps (parsing a dyntag requires walking parsed
dyntags), add a set of internal funcs for returning the raw values.

You can see this in action:
$ eu-strip -g --strip-sections a.out
$ readelf -S a.out
<nothing>
$ lddtree.py ./a.out
a.out (interpreter => /lib64/ld-linux-x86-64.so.2)
    libïäöëß.so => None
    libc.so.6 => /lib64/libc.so.6

11 years agosmall fix in todo
Eli Bendersky [Sun, 9 Jun 2013 22:08:45 +0000 (15:08 -0700)]
small fix in todo

11 years agoupdate changes
Eli Bendersky [Sun, 9 Jun 2013 13:47:11 +0000 (06:47 -0700)]
update changes

11 years agoupdate readme
Eli Bendersky [Sun, 9 Jun 2013 13:46:48 +0000 (06:46 -0700)]
update readme

11 years agochanged .hgignore to .gitignore
Eli Bendersky [Sat, 8 Jun 2013 22:56:26 +0000 (15:56 -0700)]
changed .hgignore to .gitignore

11 years agochanged permission of elf file to -x
Eli Bendersky [Sat, 8 Jun 2013 22:49:19 +0000 (15:49 -0700)]
changed permission of elf file to -x

11 years agoupdated changelog
Eli Bendersky [Sat, 8 Jun 2013 22:45:58 +0000 (15:45 -0700)]
updated changelog

11 years agoMerge pull request #16
Eli Bendersky [Sat, 8 Jun 2013 22:39:18 +0000 (15:39 -0700)]
Merge pull request #16

11 years agoBetter ARM support (with AArch64). Contributed by Dobromir Stefanov
Eli Bendersky [Sat, 8 Jun 2013 16:40:41 +0000 (09:40 -0700)]
Better ARM support (with AArch64). Contributed by Dobromir Stefanov

11 years agoAdd some additional GNU forms
Eli Bendersky [Sat, 8 Jun 2013 15:47:56 +0000 (08:47 -0700)]
Add some additional GNU forms

11 years agorename some methods to be more consistent
Yann Rouillard [Fri, 31 May 2013 20:37:05 +0000 (22:37 +0200)]
rename some methods to be more consistent

11 years agomore succint code for describer_ver_flags and describe_syminfo_flags
Yann Rouillard [Fri, 31 May 2013 20:32:51 +0000 (22:32 +0200)]
more succint code for describer_ver_flags and describe_syminfo_flags

11 years agoCreate a common parent class for Version (Definition|Dependency) section to share...
Yann Rouillard [Fri, 31 May 2013 20:15:09 +0000 (22:15 +0200)]
Create a common parent class for Version (Definition|Dependency) section to share common code

11 years agoRemove Table from GNU version sections class name
Yann Rouillard [Fri, 31 May 2013 19:01:25 +0000 (21:01 +0200)]
Remove Table from GNU version sections class name

11 years agoadd missing unit test
Yann Rouillard [Wed, 29 May 2013 21:53:11 +0000 (23:53 +0200)]
add missing unit test

11 years agofix versions classes import in readelf
Yann Rouillard [Wed, 29 May 2013 21:52:39 +0000 (23:52 +0200)]
fix versions classes import in readelf

11 years agoput -V readelf option before dwarf stuff
Yann Rouillard [Wed, 29 May 2013 21:51:00 +0000 (23:51 +0200)]
put -V readelf option before dwarf stuff

11 years agopep8 fixes
Yann Rouillard [Wed, 29 May 2013 21:47:50 +0000 (23:47 +0200)]
pep8 fixes

11 years agosplit gnu|sunw versions code in a separate file
Yann Rouillard [Wed, 29 May 2013 21:34:51 +0000 (23:34 +0200)]
split gnu|sunw versions code in a separate file

11 years agorename Ver(def|need|sym)TableSection to GNUVer(Def|Need|Sym)TableSection
Yann Rouillard [Wed, 29 May 2013 21:23:27 +0000 (23:23 +0200)]
rename Ver(def|need|sym)TableSection to GNUVer(Def|Need|Sym)TableSection

11 years agoadded support for version definition, version dependency and version symbol sections...
Yann Rouillard [Mon, 27 May 2013 20:44:28 +0000 (22:44 +0200)]
added support for version definition, version dependency and version symbol sections in pyelftools and readelf.py

11 years agoMore DWARFv4 parsing goodness. Also added some hookups for parsing .eh_frame
Eli Bendersky [Sat, 25 May 2013 22:47:55 +0000 (15:47 -0700)]
More DWARFv4 parsing goodness. Also added some hookups for parsing .eh_frame
but this isn't enabled yet, because pyelftools can't yet successfully parse
it (have to look at it deeper).

I tweaked the build of the gcc48-simple sample to generate .dwarf_frame
as well.

11 years agoMore tweaks to succesfully parse an object file generated by gcc 4.8 with
Eli Bendersky [Sat, 25 May 2013 16:28:12 +0000 (09:28 -0700)]
More tweaks to succesfully parse an object file generated by gcc 4.8 with
DWARFv4

11 years agocleanup whitespace
Eli Bendersky [Sat, 25 May 2013 14:21:05 +0000 (07:21 -0700)]
cleanup whitespace

11 years agoInitial DWARF4 support for Clang-generated DWARF. Based on patch by Stefan Hepp
Eli Bendersky [Sat, 25 May 2013 14:03:27 +0000 (07:03 -0700)]
Initial DWARF4 support for Clang-generated DWARF. Based on patch by Stefan Hepp

11 years agoMore renaming & cleaning up
Eli Bendersky [Sat, 25 May 2013 13:10:23 +0000 (06:10 -0700)]
More renaming & cleaning up

11 years agoCosmetic renaming & updated CHANGES file
Eli Bendersky [Sat, 25 May 2013 13:05:19 +0000 (06:05 -0700)]
Cosmetic renaming & updated CHANGES file

11 years agoExplicitly split test files for readelf and test files for unittests.
Eli Bendersky [Sat, 25 May 2013 12:56:37 +0000 (05:56 -0700)]
Explicitly split test files for readelf and test files for unittests.
This is so the readelf tests auto-discovery doens't accidentally find
tests it's not supposed to.

Also fixed some Python 3 compatibility issues in test_solaris_support

11 years agoMerged in yann_rouillard/pyelftools/syminfo (pull request #13)
Eli Bendersky [Sat, 25 May 2013 12:45:29 +0000 (05:45 -0700)]
Merged in yann_rouillard/pyelftools/syminfo (pull request #13)

Support for Solaris section SUNW_syminfo

11 years agoremove elfdump script and test
Yann Rouillard [Thu, 23 May 2013 22:43:51 +0000 (00:43 +0200)]
remove elfdump script and test

11 years agoadd some comments in the solaris unit test
Yann Rouillard [Thu, 23 May 2013 22:40:56 +0000 (00:40 +0200)]
add some comments in the solaris unit test

11 years agoadd syminfo boundto description function
Yann Rouillard [Sat, 11 May 2013 17:00:45 +0000 (19:00 +0200)]
add syminfo boundto description function

11 years agoelfdump: handles the extern symbol case in the syminfo table
Yann Rouillard [Fri, 10 May 2013 12:43:03 +0000 (14:43 +0200)]
elfdump: handles the extern symbol case in the syminfo table

11 years agoreorder syminfo flags display to match elfdump display
Yann Rouillard [Fri, 10 May 2013 12:42:39 +0000 (14:42 +0200)]
reorder syminfo flags display to match elfdump display

11 years agofix syminfo flags description: S flag (capability) is always first
Yann Rouillard [Fri, 10 May 2013 02:21:03 +0000 (04:21 +0200)]
fix syminfo flags description: S flag (capability) is always first

11 years agoelfdump now correctly displays syminfo entries with filter attribute
Yann Rouillard [Fri, 10 May 2013 02:19:06 +0000 (04:19 +0200)]
elfdump now correctly displays syminfo entries with filter attribute

11 years agoadd SUNW filter tag in the list of special tags
Yann Rouillard [Fri, 10 May 2013 02:18:25 +0000 (04:18 +0200)]
add SUNW filter tag in the list of special tags

11 years agoadd sun specific dynamic tags
Yann Rouillard [Fri, 10 May 2013 02:17:24 +0000 (04:17 +0200)]
add sun specific dynamic tags

11 years agofix missing variable initialisation in elfdump
Yann Rouillard [Fri, 10 May 2013 02:04:22 +0000 (04:04 +0200)]
fix missing variable initialisation in elfdump

11 years agofix comment mistake
Yann Rouillard [Sun, 19 May 2013 16:44:00 +0000 (18:44 +0200)]
fix comment mistake

11 years agosimpler check for syminfo entries that are not displayed by elfdump
Yann Rouillard [Sun, 19 May 2013 16:43:22 +0000 (18:43 +0200)]
simpler check for syminfo entries that are not displayed by elfdump

11 years agosome pep8 compliance fixes
Yann Rouillard [Sun, 19 May 2013 16:39:43 +0000 (18:39 +0200)]
some pep8 compliance fixes

11 years agominor modification in the section search loop of elfdump.py
Yann Rouillard [Sun, 19 May 2013 16:35:32 +0000 (18:35 +0200)]
minor modification in the section search loop of elfdump.py

11 years agomade a new branch to store syminfo specific patches
Yann Rouillard [Sun, 19 May 2013 16:00:00 +0000 (18:00 +0200)]
made a new branch to store syminfo specific patches

11 years agoFixed a stupid mistake on SYMINFO name (I should change my terminal font)
Yann Rouillard [Mon, 29 Apr 2013 23:59:27 +0000 (01:59 +0200)]
Fixed a stupid mistake on SYMINFO name (I should change my terminal font)

11 years agoadded elfdump comparison test
Yann Rouillard [Mon, 29 Apr 2013 23:40:33 +0000 (01:40 +0200)]
added elfdump comparison test

11 years agoAdded unit test for solaris (SUNW_syminfo section only for now)
Yann Rouillard [Mon, 29 Apr 2013 23:40:00 +0000 (01:40 +0200)]
Added unit test for solaris (SUNW_syminfo section only for now)

11 years agostart enumerating syminfo entries at index 1
Yann Rouillard [Mon, 29 Apr 2013 00:07:06 +0000 (02:07 +0200)]
start enumerating syminfo entries at index 1

11 years agoadded elfdump clone based on pyelftools, only support -y option currently
Yann Rouillard [Sun, 28 Apr 2013 23:39:51 +0000 (01:39 +0200)]
added elfdump clone based on pyelftools, only support -y option currently

11 years agoadded support for SUNW_syminfo header
Yann Rouillard [Sun, 28 Apr 2013 23:38:40 +0000 (01:38 +0200)]
added support for SUNW_syminfo header

11 years agoAdded tag v0.21 for changeset 1038c1604c31
Eli Bendersky [Wed, 17 Apr 2013 12:57:58 +0000 (05:57 -0700)]
Added tag v0.21 for changeset 1038c1604c31

11 years agoupdated manifest and changelog v0.21
Eli Bendersky [Wed, 17 Apr 2013 12:46:42 +0000 (05:46 -0700)]
updated manifest and changelog

11 years agoAdded more enums to ENUM_SH_TYPE
Eli Bendersky [Wed, 17 Apr 2013 12:35:07 +0000 (05:35 -0700)]
Added more enums to ENUM_SH_TYPE

11 years agoUpdated the e_machine enum, based on an Internet source.
automatthias [Sun, 14 Apr 2013 23:11:03 +0000 (00:11 +0100)]
Updated the e_machine enum, based on an Internet source.

http://www.scs.stanford.edu/11wi-cs140/pintos/specs/sysv-abi-update.html/ch4.eheader.html

11 years agoIssue #8: fix the dwarf_decode_address example (off-by-one error in line reporting)
Eli Bendersky [Fri, 12 Apr 2013 13:29:37 +0000 (06:29 -0700)]
Issue #8: fix the dwarf_decode_address example (off-by-one error in line reporting)

11 years agoExamples should prefer local pyelftools to installed one
Eli Bendersky [Wed, 10 Apr 2013 04:25:54 +0000 (21:25 -0700)]
Examples should prefer local pyelftools to installed one

11 years agobetter way to check if a dir exists
Eli Bendersky [Mon, 8 Apr 2013 13:45:01 +0000 (06:45 -0700)]
better way to check if a dir exists

11 years agoadd comment
Eli Bendersky [Mon, 8 Apr 2013 13:41:37 +0000 (06:41 -0700)]
add comment

11 years agoSetup sys.path properly this time (I'll update the hacking guide to
Eli Bendersky [Mon, 8 Apr 2013 13:38:57 +0000 (06:38 -0700)]
Setup sys.path properly this time (I'll update the hacking guide to
explain what's been done)

11 years agomake readelf.py pick up local elftools before system one
Eli Bendersky [Sat, 6 Apr 2013 14:05:35 +0000 (07:05 -0700)]
make readelf.py pick up local elftools before system one

11 years agoFix sys.path setup to prepend '.', rather than append. Also, remove '..'
Eli Bendersky [Sat, 6 Apr 2013 14:00:00 +0000 (07:00 -0700)]
Fix sys.path setup to prepend '.', rather than append. Also, remove '..'
and allow running only from the root directory.

11 years agoClarify how/why we look for binutils's readelf
Eli Bendersky [Sat, 6 Apr 2013 13:44:33 +0000 (06:44 -0700)]
Clarify how/why we look for binutils's readelf

11 years agodoc fixes
Eli Bendersky [Sun, 31 Mar 2013 23:57:03 +0000 (16:57 -0700)]
doc fixes

11 years agoFix some Python 3 goofs and make sure the tests execute with the correct
Eli Bendersky [Sun, 31 Mar 2013 21:19:21 +0000 (14:19 -0700)]
Fix some Python 3 goofs and make sure the tests execute with the correct
version of Python (the same the runners themselves were executed with).

11 years agoupdate docs
Eli Bendersky [Sun, 31 Mar 2013 20:58:10 +0000 (13:58 -0700)]
update docs

11 years agoFix formatting of some dynamic tag fields to match readelf
Eli Bendersky [Sun, 31 Mar 2013 14:58:21 +0000 (07:58 -0700)]
Fix formatting of some dynamic tag fields to match readelf

11 years agoTweak dynamic section handling to decipher DT_SONAME + small cleanups
Eli Bendersky [Sun, 31 Mar 2013 13:56:56 +0000 (06:56 -0700)]
Tweak dynamic section handling to decipher DT_SONAME + small cleanups

11 years agoremove some dead code
Eli Bendersky [Sun, 31 Mar 2013 03:34:57 +0000 (20:34 -0700)]
remove some dead code

11 years agoFix some other differences from the output of readelf in binutils 2.23
Eli Bendersky [Sun, 31 Mar 2013 00:47:32 +0000 (17:47 -0700)]
Fix some other differences from the output of readelf in binutils 2.23

11 years agoFix the way an include directory is inferred for a file in line programs.
Eli Bendersky [Sun, 31 Mar 2013 00:23:36 +0000 (17:23 -0700)]
Fix the way an include directory is inferred for a file in line programs.

Applies only to readelf.py at this point, because the Dwarf APIs don't provide
this functionality directly.

11 years agodebug-dump=info should print null DIEs to conform to the new readelf.
Eli Bendersky [Sat, 30 Mar 2013 23:39:30 +0000 (16:39 -0700)]
debug-dump=info should print null DIEs to conform to the new readelf.

11 years agoCosmetic changes. +added sublime project file
Eli Bendersky [Thu, 28 Mar 2013 14:38:59 +0000 (07:38 -0700)]
Cosmetic changes. +added sublime project file

11 years agoSmarter customization of READELF_PATH in run_readelf_tests
Eli Bendersky [Sat, 23 Mar 2013 13:54:54 +0000 (06:54 -0700)]
Smarter customization of READELF_PATH in run_readelf_tests

11 years agoConvert ordereddict.py line endings to unix
Eli Bendersky [Sat, 23 Mar 2013 13:44:19 +0000 (06:44 -0700)]
Convert ordereddict.py line endings to unix

11 years agoAdded license snippet to all files in the code. Whitespace cleanup.
Eli Bendersky [Sat, 23 Mar 2013 13:33:09 +0000 (06:33 -0700)]
Added license snippet to all files in the code. Whitespace cleanup.

11 years agocleanup & updated CHANGES
Eli Bendersky [Sat, 23 Mar 2013 13:16:56 +0000 (06:16 -0700)]
cleanup & updated CHANGES

11 years agomerge local with pull-request #7 merge
Eli Bendersky [Sat, 23 Mar 2013 13:14:21 +0000 (06:14 -0700)]
merge local with pull-request #7 merge

11 years agoslight TODO update
Eli Bendersky [Sat, 23 Mar 2013 13:13:57 +0000 (06:13 -0700)]
slight TODO update

11 years agoadd support for parsing of the dynamic section/segment and its tags
Mike Frysinger [Sat, 23 Mar 2013 06:47:32 +0000 (02:47 -0400)]
add support for parsing of the dynamic section/segment and its tags

11 years agotouching up after pull request 6
Eli Bendersky [Thu, 17 Jan 2013 13:41:22 +0000 (05:41 -0800)]
touching up after pull request 6

11 years agoAdd a test for parsing an ARM ELF file.
Matthew Fernandez [Thu, 17 Jan 2013 05:23:07 +0000 (16:23 +1100)]
Add a test for parsing an ARM ELF file.

11 years agoBasic support for ARM in machine header.
Matthew Fernandez [Thu, 17 Jan 2013 01:14:34 +0000 (12:14 +1100)]
Basic support for ARM in machine header.

11 years agotrim trailing whitespace and reorganize a bit of comments
Eli Bendersky [Mon, 7 Jan 2013 05:10:38 +0000 (21:10 -0800)]
trim trailing whitespace and reorganize a bit of comments

11 years agocleanups of trailing whitespace
Eli Bendersky [Mon, 7 Jan 2013 00:10:10 +0000 (16:10 -0800)]
cleanups of trailing whitespace

11 years agoTrim trailing whitespace in some code and wrap to 80 cols in README.rst
Eli Bendersky [Sun, 6 Jan 2013 22:26:49 +0000 (14:26 -0800)]
Trim trailing whitespace in some code and wrap to 80 cols in README.rst

11 years agobump version everywhere since the trunk represents an unreleased *next* version
Eli Bendersky [Sun, 6 Jan 2013 14:12:05 +0000 (06:12 -0800)]
bump version everywhere since the trunk represents an unreleased *next* version

11 years agoIssue #7: be more forgiving to incorrect DWARF that has extra NULLs in DIE trees
Eli Bendersky [Sun, 6 Jan 2013 14:09:57 +0000 (06:09 -0800)]
Issue #7: be more forgiving to incorrect DWARF that has extra NULLs in DIE trees

11 years agoremove 2.6 in tox.ini
Eli Bendersky [Sat, 29 Dec 2012 14:25:18 +0000 (06:25 -0800)]
remove 2.6 in tox.ini

11 years agorename README->README.rst to render correctly on BB
Eli Bendersky [Sat, 29 Dec 2012 14:22:09 +0000 (06:22 -0800)]
rename README->README.rst to render correctly on BB

12 years agoAdded dwarf_decode_address.py example
Eli Bendersky [Thu, 5 Jul 2012 03:32:09 +0000 (06:32 +0300)]
Added dwarf_decode_address.py example