pyelftools.git
13 years agofixes in readelf. added --debug-dump=info to the tests
Eli Bendersky [Thu, 24 Nov 2011 07:05:44 +0000 (09:05 +0200)]
fixes in readelf. added --debug-dump=info to the tests

13 years agoit's alive, ALIVEhg sthg st! DWARF relocations seem to be working fine
Eli Bendersky [Thu, 24 Nov 2011 06:12:37 +0000 (08:12 +0200)]
it's alive, ALIVEhg sthg st! DWARF relocations seem to be working fine

13 years agostill not working, but getting there. need to revise DWARF processing for per-section...
Eli Bendersky [Wed, 23 Nov 2011 14:01:52 +0000 (16:01 +0200)]
still not working, but getting there. need to revise DWARF processing for per-section streams

13 years agonothing works because we're in the middle of a relocation revamp - BUT IT WILL!!
Eli Bendersky [Wed, 23 Nov 2011 04:54:40 +0000 (06:54 +0200)]
nothing works because we're in the middle of a relocation revamp - BUT IT WILL!!

13 years agoadded extra description for DW_AT_import to conform with readelf
Eli Bendersky [Sat, 19 Nov 2011 13:29:51 +0000 (15:29 +0200)]
added extra description for DW_AT_import to conform with readelf

13 years agothe relocation manager for dwarf works! sdf
Eli Bendersky [Fri, 18 Nov 2011 10:02:57 +0000 (12:02 +0200)]
the relocation manager for dwarf works!  sdf

13 years agosome code restructuring + initial version of dwarfrelocationmanager
Eli Bendersky [Fri, 18 Nov 2011 05:07:37 +0000 (07:07 +0200)]
some code restructuring + initial version of dwarfrelocationmanager

13 years agoadd __contains__ to construct's Container. this actually fixes Relocation.is_RELA...
Eli Bendersky [Fri, 18 Nov 2011 03:55:06 +0000 (05:55 +0200)]
add __contains__ to construct's Container. this actually fixes Relocation.is_RELA which wouldn't work otherwise. also add __repr__ and __str__ to Relocation

13 years agomerge & resolve conflicts from remote
Eli Bendersky [Wed, 16 Nov 2011 05:39:45 +0000 (07:39 +0200)]
merge & resolve conflicts from remote

13 years agofix the 'key to flags' text printed after section enumeration. probably to match...
Eli Bendersky [Wed, 16 Nov 2011 05:22:57 +0000 (07:22 +0200)]
fix the 'key to flags' text printed after section enumeration. probably to match a newer readelf version

13 years agosmall fixes to have formatting consistent with readelf
eliben [Mon, 14 Nov 2011 15:53:23 +0000 (17:53 +0200)]
small fixes to have formatting consistent with readelf

13 years agoadded description for location_expr
eliben [Sun, 6 Nov 2011 13:49:37 +0000 (15:49 +0200)]
added description for location_expr
kinda works vs. readelf!

13 years agoAdded string dumping for location expressions, with tests
eliben [Sun, 6 Nov 2011 13:27:57 +0000 (15:27 +0200)]
Added string dumping for location expressions, with tests

13 years agoadded basic visiting of all OPs in location_expr.GenericLocationExprVisitor
eliben [Sun, 6 Nov 2011 09:29:49 +0000 (11:29 +0200)]
added basic visiting of all OPs in location_expr.GenericLocationExprVisitor

13 years agomore work on location_expr
Eli Bendersky [Thu, 27 Oct 2011 19:02:24 +0000 (21:02 +0200)]
more work on location_expr

13 years agostarted location_expr, added unit tests. moved readelf unittest to a more appropriate...
Eli Bendersky [Thu, 27 Oct 2011 15:34:02 +0000 (17:34 +0200)]
started location_expr, added unit tests. moved readelf unittest to a more appropriate file name

13 years agoadded name field to AttributeValue
Eli Bendersky [Thu, 27 Oct 2011 12:29:32 +0000 (14:29 +0200)]
added name field to AttributeValue

13 years agoadded name field to AttributeValue
Eli Bendersky [Thu, 27 Oct 2011 12:28:12 +0000 (14:28 +0200)]
added name field to AttributeValue

13 years agomostly implemented extra information output for dwarf info section dump
Eli Bendersky [Thu, 27 Oct 2011 08:53:13 +0000 (10:53 +0200)]
mostly implemented extra information output for dwarf info section dump

13 years agomore descriptions added for DWARF info
eliben [Wed, 26 Oct 2011 11:10:58 +0000 (13:10 +0200)]
more descriptions added for DWARF info

13 years agoadded some basic description capabilities for DWARF attributes in debug_info
eliben [Wed, 26 Oct 2011 08:42:34 +0000 (10:42 +0200)]
added some basic description capabilities for DWARF attributes in debug_info

13 years ago* start adding debug_dump=info to readelf.py
eliben [Sun, 2 Oct 2011 11:47:12 +0000 (13:47 +0200)]
* start adding debug_dump=info to readelf.py
* adding support to dwarf code for the above

13 years agodocstring clarification for DWARFStructs
eliben [Sun, 2 Oct 2011 08:31:46 +0000 (10:31 +0200)]
docstring clarification for DWARFStructs

13 years agounflattening the DIE tree by CU done - now DIEs have functional iter_children, get_pa...
eliben [Sun, 2 Oct 2011 07:50:37 +0000 (09:50 +0200)]
unflattening the DIE tree by CU done - now DIEs have functional iter_children, get_parent and iter_siblings methods!

13 years agoCU will now parse all its DIEs (lazily, when any specific DIE is requested)
eliben [Mon, 26 Sep 2011 08:17:03 +0000 (11:17 +0300)]
CU will now parse all its DIEs (lazily, when any specific DIE is requested)

13 years agomoved utils/ dir to tests/
Eli Bendersky [Sun, 25 Sep 2011 02:38:07 +0000 (05:38 +0300)]
moved utils/ dir to tests/

13 years agoadded a utils folder with elf_creator.c
Eli Bendersky [Sun, 25 Sep 2011 02:37:30 +0000 (05:37 +0300)]
added a utils folder with elf_creator.c

13 years ago* added new test file - an object compiled from C++, on x64
Eli Bendersky [Fri, 23 Sep 2011 14:14:08 +0000 (17:14 +0300)]
* added new test file - an object compiled from C++, on x64
* adjusted readelf to limit width of symbol names in relocation dump

13 years agofix detection of flag_after_symtable in compare_output: has to be lower-cased after...
Eli Bendersky [Fri, 23 Sep 2011 14:04:21 +0000 (17:04 +0300)]
fix detection of flag_after_symtable in compare_output: has to be lower-cased after the change made to lower() the lines before comparing

13 years ago* added another test file (real-life object file borrowed from libelf)
Eli Bendersky [Fri, 23 Sep 2011 12:23:41 +0000 (15:23 +0300)]
* added another test file (real-life object file borrowed from libelf)
* print out notification about sections having relocations against them in the file
* munge run_tests to ignore case when comparing lines

13 years ago* renamed test files to be consistent
Eli Bendersky [Fri, 23 Sep 2011 09:03:48 +0000 (12:03 +0300)]
* renamed test files to be consistent
* added a real-life test file - the libelf SO on 32-bit
* fixed a formatting difference in readelf.py
* enabled selecting which test files to run on in run_tests.py

13 years agomerge
Eli Bendersky [Fri, 23 Sep 2011 08:00:34 +0000 (11:00 +0300)]
merge

13 years agorelocation output working in readelf comparison
Eli Bendersky [Fri, 23 Sep 2011 07:59:59 +0000 (10:59 +0300)]
relocation output working in readelf comparison

13 years agofixed parsing of r_info field
Eli Bendersky [Fri, 23 Sep 2011 03:06:47 +0000 (06:06 +0300)]
fixed parsing of r_info field

13 years agocleanup and cosmetics - for a healthy future!! er... what?
eliben [Thu, 22 Sep 2011 11:55:19 +0000 (14:55 +0300)]
cleanup and cosmetics - for a healthy future!! er... what?

13 years agoadding some useful attributes & method to DIE
eliben [Thu, 22 Sep 2011 10:54:26 +0000 (13:54 +0300)]
adding some useful attributes & method to DIE

13 years agosome refactoring. parsing a single DIE now appears to be working
eliben [Thu, 22 Sep 2011 10:17:07 +0000 (13:17 +0300)]
some refactoring. parsing a single DIE now appears to be working

13 years agomore preparations for full DIE parsing:
eliben [Thu, 22 Sep 2011 08:46:26 +0000 (11:46 +0300)]
more preparations for full DIE parsing:
- DWARFStructs got a new target_addr field that reflects the size of address fields in a CU
- DWARFInfo now gives access to the symbol table
- fixed stream parsing bugs that happened because the stream was not being preserved during parsing while issuing calls to other APIs that also move the stream

13 years agosome fixes in relocation printing. INFO STILL PRINTED ENDIAN-REVERSED -- WTF???
Eli Bendersky [Thu, 22 Sep 2011 03:37:07 +0000 (06:37 +0300)]
some fixes in relocation printing. INFO STILL PRINTED ENDIAN-REVERSED -- WTF???

13 years ago* completed implementation of abbrevtable
eliben [Wed, 21 Sep 2011 09:09:53 +0000 (12:09 +0300)]
* completed implementation of abbrevtable
* started implementing DIE
* added code to CompileUnit to tie them all together

DIEs start showing signs of life

13 years agoabbrev table almost functioning
eliben [Tue, 20 Sep 2011 13:03:59 +0000 (16:03 +0300)]
abbrev table almost functioning

13 years agoStarted adding abbrev table stuff
eliben [Tue, 20 Sep 2011 09:57:01 +0000 (12:57 +0300)]
Started adding abbrev table stuff

13 years ago* DWARFInfo now doesn't receive a "dwarf class" argument, since it must infer it...
eliben [Tue, 20 Sep 2011 07:20:32 +0000 (10:20 +0300)]
* DWARFInfo now doesn't receive a "dwarf class" argument, since it must infer it on its own from the info section
* Parsing of CU headers was fixed and now appears to be working

13 years agosome more work towards relocations
Eli Bendersky [Tue, 20 Sep 2011 03:48:52 +0000 (06:48 +0300)]
some more work towards relocations

13 years agoadding _default_=Pass to elf enums
Eli Bendersky [Tue, 20 Sep 2011 03:12:00 +0000 (06:12 +0300)]
adding _default_=Pass to elf enums

13 years ago* take DWARF stuff from ELFFile
eliben [Mon, 19 Sep 2011 12:48:39 +0000 (15:48 +0300)]
* take DWARF stuff from ELFFile
* Currently DWARF format (32 or 64-bit) isn't handled correctly. see TODO

13 years agoImplemented ELFFile.get_section_by_name and changed readelf.py to use it
eliben [Mon, 19 Sep 2011 10:10:57 +0000 (13:10 +0300)]
Implemented ELFFile.get_section_by_name and changed readelf.py to use it

13 years agoAdded dwarf/compileunit.py and dwarf/dwarfinfo.py and started filling in details
eliben [Mon, 19 Sep 2011 09:54:32 +0000 (12:54 +0300)]
Added dwarf/compileunit.py and dwarf/dwarfinfo.py and started filling in details

13 years agopartial support for parsing relocation sections
Eli Bendersky [Mon, 19 Sep 2011 03:51:52 +0000 (06:51 +0300)]
partial support for parsing relocation sections

13 years agocreated elftools/dwarf and started writing down some basic structs for data primitive...
eliben [Sun, 18 Sep 2011 14:31:10 +0000 (17:31 +0300)]
created elftools/dwarf and started writing down some basic structs for data primitives and various encodings the format uses

13 years agoimplemented string dumping, with tests
Eli Bendersky [Sun, 18 Sep 2011 03:04:30 +0000 (06:04 +0300)]
implemented string dumping, with tests

13 years agoadded hex dump of sections
Eli Bendersky [Sat, 17 Sep 2011 12:28:28 +0000 (15:28 +0300)]
added hex dump of sections

13 years agofixing comparison in run_tests. moving all binary files to testfiles/
Eli Bendersky [Sat, 17 Sep 2011 11:07:57 +0000 (14:07 +0300)]
fixing comparison in run_tests. moving all binary files to testfiles/

13 years agotest suite implemented. fixing some problems in elftools and readelf
Eli Bendersky [Sat, 17 Sep 2011 07:39:29 +0000 (10:39 +0300)]
test suite implemented. fixing some problems in elftools and readelf

13 years agothe beginnings of a test harness
Eli Bendersky [Sat, 17 Sep 2011 04:13:49 +0000 (07:13 +0300)]
the beginnings of a test harness

13 years agofinalizing cmdling options for current functionality
Eli Bendersky [Sat, 17 Sep 2011 03:44:02 +0000 (06:44 +0300)]
finalizing cmdling options for current functionality

13 years agosome more command-line option handling
Eli Bendersky [Fri, 16 Sep 2011 14:16:20 +0000 (17:16 +0300)]
some more command-line option handling

13 years agostarted adding command-line options to readelf
Eli Bendersky [Fri, 16 Sep 2011 13:59:52 +0000 (16:59 +0300)]
started adding command-line options to readelf

13 years agominor tweak in output formatting for symbols
Eli Bendersky [Fri, 16 Sep 2011 12:20:20 +0000 (15:20 +0300)]
minor tweak in output formatting for symbols

13 years agodisplaying symtables kinda works
Eli Bendersky [Fri, 16 Sep 2011 11:52:54 +0000 (14:52 +0300)]
displaying symtables kinda works

13 years agosection header output kinda working
Eli Bendersky [Fri, 16 Sep 2011 08:10:44 +0000 (11:10 +0300)]
section header output kinda working

13 years agoSection to segment mapping seems to be working - yay!
Eli Bendersky [Thu, 15 Sep 2011 04:07:54 +0000 (07:07 +0300)]
Section to segment mapping seems to be working - yay!

13 years agoadded segment attribute formatting for 64-bit, and fixed some words to xwords in...
Eli Bendersky [Wed, 14 Sep 2011 03:18:28 +0000 (06:18 +0300)]
added segment attribute formatting for 64-bit, and fixed some words to xwords in the segment struct definition

13 years agoImplementing reading the INTERP path in segments
Eli Bendersky [Wed, 14 Sep 2011 02:58:06 +0000 (05:58 +0300)]
Implementing reading the INTERP path in segments

13 years agoimplemented some of program header display
Eli Bendersky [Tue, 13 Sep 2011 03:50:28 +0000 (06:50 +0300)]
implemented some of program header display

13 years agosome cleanup
Eli Bendersky [Fri, 9 Sep 2011 07:23:16 +0000 (10:23 +0300)]
some cleanup

13 years agoprints ELF header correctly
Eli Bendersky [Fri, 9 Sep 2011 07:05:57 +0000 (10:05 +0300)]
prints ELF header correctly

13 years agosome more header descriptions added
Eli Bendersky [Fri, 9 Sep 2011 05:22:35 +0000 (08:22 +0300)]
some more header descriptions added

13 years ago* Started writing readelf.py
Eli Bendersky [Fri, 9 Sep 2011 05:11:06 +0000 (08:11 +0300)]
* Started writing readelf.py
* Added file with textual descriptions of enums, for readelf.py

13 years agoadded Symbol decoding from a symbol table section
Eli Bendersky [Fri, 9 Sep 2011 03:02:47 +0000 (06:02 +0300)]
added Symbol decoding from a symbol table section

13 years agoremoved CRs
Eli Bendersky [Thu, 8 Sep 2011 17:12:44 +0000 (20:12 +0300)]
removed CRs

13 years agomoving stuff around
eliben [Thu, 8 Sep 2011 14:15:53 +0000 (17:15 +0300)]
moving stuff around

13 years agoAdded a SymbolTableSection class and split functionality from ELFFile to create it
eliben [Thu, 8 Sep 2011 13:57:21 +0000 (16:57 +0300)]
Added a SymbolTableSection class and split functionality from ELFFile to create it

13 years agoSome code reorg:
eliben [Thu, 8 Sep 2011 13:24:49 +0000 (16:24 +0300)]
Some code reorg:
* created common/ dir and moved exceptions there (along with utils)
* moved struct_parse from elffile to utils
* moved string table functionality to its own section class

13 years ago* Added handling of segments
eliben [Thu, 8 Sep 2011 11:49:30 +0000 (14:49 +0300)]
* Added handling of segments
* Added iteration API for sections

13 years agoAdded reading of sections and decoding their name from the string table
ebenders [Thu, 8 Sep 2011 09:37:48 +0000 (12:37 +0300)]
Added reading of sections and decoding their name from the string table

13 years ago* Added the ELFFile class - top-level interface to ELF files
ebenders [Thu, 8 Sep 2011 08:27:53 +0000 (11:27 +0300)]
* Added the ELFFile class - top-level interface to ELF files
* Added exceptions classes

13 years ago* renamed file to constants.py
ebenders [Thu, 8 Sep 2011 07:06:18 +0000 (10:06 +0300)]
* renamed file to constants.py
* defined stuff for program header

13 years agoadded top-level readme
ebenders [Wed, 7 Sep 2011 12:57:19 +0000 (15:57 +0300)]
added top-level readme

13 years ago* also create other stuff in struct constructor
ebenders [Wed, 7 Sep 2011 12:36:11 +0000 (15:36 +0300)]
* also create other stuff in struct constructor
* sample for getting ELF's string table contents

13 years agosome structs filled in
ebenders [Wed, 7 Sep 2011 12:21:07 +0000 (15:21 +0300)]
some structs filled in

13 years agosomething basic
ebenders [Wed, 7 Sep 2011 08:12:47 +0000 (11:12 +0300)]
something basic