Eli Bendersky [Fri, 5 Aug 2016 03:18:13 +0000 (20:18 -0700)]
fromdos setup.py
Eli Bendersky [Fri, 5 Aug 2016 03:17:55 +0000 (20:17 -0700)]
Getting ready to release 0.24
Eli Bendersky [Tue, 2 Aug 2016 20:02:21 +0000 (13:02 -0700)]
Add Python 3.5 testing to travis
Eli Bendersky [Tue, 2 Aug 2016 19:55:44 +0000 (12:55 -0700)]
Update CHANGES with a few more recent changes
Eli Bendersky [Mon, 1 Aug 2016 16:17:20 +0000 (09:17 -0700)]
Whitespace cleanup
Eli Bendersky [Mon, 1 Aug 2016 11:14:35 +0000 (04:14 -0700)]
Merge pull request #109 from gbenson/master
Support SHT_NOTE sections
Gary Benson [Thu, 14 Jul 2016 10:00:08 +0000 (11:00 +0100)]
Support SHT_NOTE sections
This commit adds a new NoteSection class with an iter_notes
iterator which operates in much the same way as NoteSegment's
iter_notes. An example to illustrate usage is added, and its
reference output is added for the test suite.
Eli Bendersky [Thu, 14 Jul 2016 12:00:41 +0000 (05:00 -0700)]
Merge pull request #108 from dorothychen/aranges
parse .debug_aranges section
Dorothy Chen [Fri, 1 Jul 2016 20:44:36 +0000 (16:44 -0400)]
parsed .debug_aranges section, simple interface mapping address ranges to CU offsets
fixed bug in finding correct arange entry, given an addr
cosmetic changes per pull request thread #108, and updated relevant tests
minor arange test changes
filled in comments
update test formatting for aranges
update test formatting for aranges
Fix off-by-one bug
For real this time. If the query addr == beginning address, bisect_left won't work.
Eli Bendersky [Mon, 4 Jul 2016 12:10:31 +0000 (05:10 -0700)]
Merge pull request #107 from DavidSpickett/master
Fix Windows import error by getting page size using 'mmap' module if 'resource' is not available.
David Spickett [Fri, 1 Jul 2016 10:43:49 +0000 (11:43 +0100)]
Get page size using 'mmap' module if 'resource' is not available.
The resource module is Unix only, use mmap for Windows.
Eli Bendersky [Mon, 20 Jun 2016 22:42:35 +0000 (15:42 -0700)]
Merge pull request #102 from ttsugriy/master
Support ZLIB compressed debug sections
ttsugrii [Tue, 24 May 2016 01:45:32 +0000 (18:45 -0700)]
Support ZLIB compressed debug sections
objcopy --compress-debug-sections uses ZLIB compression to reduce debug
sections, which can sometimes be larger than the size of the binary
itself. This change makes pyelftools consider compressed debug sections
when checking for DWARF data.
readelf tool supports other types of compressed sections
(https://github.com/facebook/binutils/blob/master/binutils/readelf.c#L12038)
but their support is outside of scope of this change.
Test plan:
$ ./test/run_all_unittests.py
Signed-off-by: Stanislas P1kachu Lejay <p1kachu@lse.epita.fr>
Eli Bendersky [Sun, 19 Jun 2016 15:10:40 +0000 (08:10 -0700)]
Merge pull request #104 from P1kachu/master
Fix case where struct is None
Stanislas P1kachu Lejay [Sun, 19 Jun 2016 12:12:41 +0000 (14:12 +0200)]
Fix case where struct is None
Signed-off-by: Stanislas P1kachu Lejay <p1kachu@lse.epita.fr>
Eli Bendersky [Wed, 2 Mar 2016 12:15:33 +0000 (04:15 -0800)]
Fix descriptions._data_member_location_extra to handle DW_FORM_sdata
Taken from #98 - contributed by @bseifers
Eli Bendersky [Fri, 11 Dec 2015 02:29:34 +0000 (18:29 -0800)]
Merge pull request #89 from sethml/feature/improved-DWARFv4
Improved DWARFv4 support.
Eli Bendersky [Fri, 11 Dec 2015 02:28:24 +0000 (18:28 -0800)]
Merge pull request #91 from sethml/feature/DW_TAG_GNU_call_site
Add DW_TAG_GNU_call_site* for better dumping.
Seth LaForge [Thu, 3 Dec 2015 04:43:36 +0000 (20:43 -0800)]
Improved DWARFv4 support.
Handle DW_AT_data_member_location attributes with type DW_FORM_data*, which
store a simple integer offset rather than dwarf expression. This seems to come
up with struct members, at least on ARM.
Handle DW_AT_location attributes with type DW_FORM_sec_offset as not having
dwarf expressions, as allowed by the DWARFv4 standard. This seems to come up
with some local variables, at least on ARM.
Test DW_FORM_sec_offset support in location lists and DW_AT_data_member_location formatting support.
Test code, compiled with gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4 on x86-64:
struct Foo {
char bim : 8;
char bar : 3;
char baz : 5;
};
int get_bar(struct Foo foo) {
return foo.bar;
}
int f1(int a, char b) {
return a+b;
}
Seth LaForge [Thu, 3 Dec 2015 04:40:56 +0000 (20:40 -0800)]
Add DW_TAG_GNU_call_site* for better tail-call debug descriptions.
This comes up for functions which have tail-calls optimized.
Describe location list for DW_AT_GNU_call_site_* to match readelf.
Add test elf file to demonstrate that we match readelf for DW_AT_GNU_call_site_*. C source is:
extern int f2(int a, char b);
extern char var;
int f1(void) { return f2(666, var); }
Eli Bendersky [Sat, 5 Dec 2015 17:56:49 +0000 (09:56 -0800)]
Merge pull request #90 from sethml/feature/readelf-formatting
Minor changes to readelf formatting.
Seth LaForge [Thu, 3 Dec 2015 04:33:45 +0000 (20:33 -0800)]
Minor changes to readelf formatting.
This makes the output more similar to GNU readelf.
It's not identical - in particular there are still a lot of whitespace
differences - but at least gets you within striking distance of no changes when
comparing with "diff -w".
Eli Bendersky [Tue, 25 Aug 2015 12:18:45 +0000 (05:18 -0700)]
Cosmetic changes
Eli Bendersky [Tue, 25 Aug 2015 12:12:44 +0000 (05:12 -0700)]
Merge pull request #82 from Tustvold/master
Added support for DWARF v4 line program headers.
Raphael Taylor-Davies [Mon, 17 Aug 2015 14:27:53 +0000 (15:27 +0100)]
Added support for DWARF v4 lineprograms
DWARF v4 lineprograms add additional debugging information for VLIW architectures, specifically they add an op_index field identifying the operation within the instruction to which this lineprogram refers.
This field has been added to the LineState object. On non-VLIW architectures and for non DWARF v4 lineprograms this field will always be 0.
Eli Bendersky [Thu, 9 Jul 2015 13:37:54 +0000 (06:37 -0700)]
Run dwarf/constants.py through fromdos
Eli Bendersky [Thu, 9 Jul 2015 13:37:01 +0000 (06:37 -0700)]
Better DWARF v4 support for decoding function ranges.
Eli Bendersky [Thu, 9 Jul 2015 13:05:19 +0000 (06:05 -0700)]
Whitespace cleanup
Eli Bendersky [Thu, 9 Jul 2015 12:35:11 +0000 (05:35 -0700)]
Merge pull request #79 from michalmalik/patch-2
Added DT_MIPS_* constants to ENUM_D_TAG
Eli Bendersky [Thu, 9 Jul 2015 12:34:02 +0000 (05:34 -0700)]
Whitespace cleanup
Eli Bendersky [Thu, 9 Jul 2015 12:31:39 +0000 (05:31 -0700)]
Flip Python 3 version for tox testing to 3.4
Michal Malik [Wed, 8 Jul 2015 11:16:14 +0000 (13:16 +0200)]
Added DT_MIPS_* constants
Defined from here http://lxr.free-electrons.com/source/arch/mips/include/asm/elf.h#L49
Eli Bendersky [Tue, 7 Jul 2015 23:07:51 +0000 (16:07 -0700)]
Make example tests work again
The example test runner now passes a special --test flag as the first
command-line argument. This affects the behavior of the examples - making them
aim at testing. Only very simple command-line flag "parsing" is used here for
the sake of minimality.
Eli Bendersky [Mon, 6 Jul 2015 20:45:38 +0000 (13:45 -0700)]
Cosmetic changes
Eli Bendersky [Sun, 5 Jul 2015 22:54:04 +0000 (15:54 -0700)]
Improve dwarf_decode_address sample a bit
Accept file + address from command line, instead of hard-coding an address.
Eli Bendersky [Sat, 20 Jun 2015 17:54:33 +0000 (10:54 -0700)]
Merge pull request #78 from michalmalik/patch-1
Added SHT_GNU_LIBLIST constant to ENUM_SH_TYPE
Michal Malik [Mon, 15 Jun 2015 10:55:54 +0000 (12:55 +0200)]
Added SHT_GNU_LIBLIST constant to ENUM_SH_TYPE
Eli Bendersky [Fri, 5 Jun 2015 13:16:28 +0000 (06:16 -0700)]
fix incorrect pull request number
Eli Bendersky [Fri, 5 Jun 2015 13:14:49 +0000 (06:14 -0700)]
Update CHANGES to reflect recent changes after the last release.
Eli Bendersky [Fri, 5 Jun 2015 13:11:46 +0000 (06:11 -0700)]
Cosmetic cleanup
Eli Bendersky [Fri, 5 Jun 2015 13:09:54 +0000 (06:09 -0700)]
Merge pull request #76 from JaySon-Huang/strings
get_string of StringTableSection return ascii-decoded strings now
JaySon-Huang [Sun, 10 May 2015 17:30:49 +0000 (01:30 +0800)]
get_string of StringTableSection return ascii-decoded strings now
fix bugs
Eli Bendersky [Sat, 11 Apr 2015 12:40:00 +0000 (05:40 -0700)]
Merge pull request #69 from Smattr/
5f62439e-b6a7-456c-b1d1-
b8313d9b6abe
ELF: Find all symbols of a given name in `get_symbol_by_name`.
Matthew Fernandez [Tue, 7 Apr 2015 00:00:55 +0000 (10:00 +1000)]
ELF: Find all symbols of a given name in `get_symbol_by_name`.
It is possible for an ELF file's symbol table to contain multiple entries under
the same symbol name. Prior to this commit, it was only possible to retrieve
the first of these via `get_symbol_by_name`. This commit alters this function
to return a list of all symbols under the given name, rather than just the
first entry. Functionality when a symbol name does not exist remains
unaffected.
Eli Bendersky [Sun, 28 Dec 2014 14:52:46 +0000 (06:52 -0800)]
Merge pull request #58 from Smattr/symbol-by-name
Functionality for retrieving a symbol by name
Matthew Fernandez [Mon, 24 Nov 2014 03:26:41 +0000 (14:26 +1100)]
ELF: Add `get_symbol_by_name` functionality.
This commit implements the equivalent of `get_section_by_name` for symbols for
ELF files.
Eli Bendersky [Sat, 8 Nov 2014 13:41:54 +0000 (05:41 -0800)]
Changes for release 0.23
Eli Bendersky [Sat, 8 Nov 2014 13:34:28 +0000 (05:34 -0800)]
Remove outdated TODO instruction
Eli Bendersky [Sat, 1 Nov 2014 13:11:59 +0000 (06:11 -0700)]
Bump minimal Python 2.x version to 2.7
This lets me banish a local version of OrderedDict, which has issues submitted
against it (e.g. pull request #53).
Python 2.7 has been out for a while now, it's time to move on. I haven't been
testing pyelftools on 2.6 for some time anyway.
Eli Bendersky [Sat, 1 Nov 2014 13:01:09 +0000 (06:01 -0700)]
Merge pull request #56 from KarlVogel/mips-support
Mips support
Karl Vogel [Sun, 26 Oct 2014 11:09:15 +0000 (12:09 +0100)]
Basic MIPS support
Eli Bendersky [Fri, 22 Aug 2014 12:35:38 +0000 (05:35 -0700)]
Merge pull request #48 from deymo/elf_note
Parse PT_NOTE segment.
Alex Deymo [Sun, 17 Aug 2014 20:15:46 +0000 (13:15 -0700)]
Parse PT_NOTE segment and expose it with the new '-n' option to readelf.
The PT_NOTE segment includes a list of notes with a header, name and
description. GNU ld includes in this segment the GNU build-id and GNU
ABI version information.
The '-n' or '--notes' option to readelf displays the notes contained
in the ELF file.
Eli Bendersky [Thu, 7 Aug 2014 12:58:45 +0000 (05:58 -0700)]
Merge pull request #45 from postmasters/parse-symtab-from-dt_symtab
Support parsing symbol table in dynamic segment.
Nam T. Nguyen [Fri, 25 Jul 2014 18:41:53 +0000 (11:41 -0700)]
Support parsing symbol table in dynamic segment.
Unlike SymbolTableSection, this patch reads from DT_SYMTAB, and
DT_STRTAB in PT_DYNAMIC segment. It heuristically determines the end of
DT_SYMTAB by finding the next higher pointer in the same segment. GNU
libc (dl-addr.c) assumes that DT_STRTAB comes after DT_SYMTAB.
Eli Bendersky [Thu, 3 Jul 2014 12:18:41 +0000 (05:18 -0700)]
Merge pull request #43 from frewsxcv/patch-1
Run tests on Python 3.4
Corey Farwell [Tue, 1 Jul 2014 23:22:38 +0000 (16:22 -0700)]
Run tests on Python 3.4
Eli Bendersky [Sat, 14 Jun 2014 13:06:20 +0000 (06:06 -0700)]
Merge pull request #40 from vapier/master
fix parsing of dynamic ELFs w/out section headers
Eli Bendersky [Thu, 5 Jun 2014 13:40:43 +0000 (06:40 -0700)]
Merge pull request #42 from vapier/misc
add Blackfin description
Mike Frysinger [Wed, 4 Jun 2014 21:55:24 +0000 (17:55 -0400)]
add Blackfin description
Eli Bendersky [Tue, 3 Jun 2014 17:32:33 +0000 (10:32 -0700)]
Some cleanup after the last merges.
Eli Bendersky [Tue, 3 Jun 2014 17:26:13 +0000 (10:26 -0700)]
Merge pull request #31 from vadmium/message
BaseException.message is deprecated in Python 2.6 and gone in 3
Eli Bendersky [Tue, 3 Jun 2014 17:14:27 +0000 (10:14 -0700)]
Merge pull request #37 from vadmium/map
Add ELFFile.map() method to get file offset from memory address
Martin Panter [Wed, 12 Feb 2014 03:02:04 +0000 (03:02 +0000)]
Add ELFFile.address_offsets() to get file offsets from a memory address
Martin Panter [Thu, 6 Dec 2012 00:00:00 +0000 (00:00 +0000)]
BaseException.message is deprecated in Python 2.6 and gone in 3
Eli Bendersky [Sat, 3 May 2014 03:39:24 +0000 (20:39 -0700)]
Merge pull request #34 from vadmium/hash
Implement Section.__hash__() to avoid Python 2’s DeprecationWarning
Eli Bendersky [Sat, 3 May 2014 03:37:27 +0000 (20:37 -0700)]
Merge pull request #35 from vadmium/warning
Avoid BytesWarning in debugging messages in Python 3
Eli Bendersky [Sat, 3 May 2014 03:04:21 +0000 (20:04 -0700)]
Merge pull request #36 from vadmium/unused
Drop unused imports
Eli Bendersky [Sat, 3 May 2014 03:03:49 +0000 (20:03 -0700)]
Merge pull request #33 from vadmium/div
Use integer division in Python 3
Eli Bendersky [Sat, 3 May 2014 02:57:50 +0000 (19:57 -0700)]
Merge pull request #32 from vadmium/tuples
Use tuples with str.endswith(), supported since Python 2.5
Martin Panter [Wed, 12 Feb 2014 14:08:11 +0000 (14:08 +0000)]
Drop unused imports
Martin Panter [Wed, 12 Feb 2014 02:43:19 +0000 (02:43 +0000)]
Avoid BytesWarning in debugging messages in Python 3
Martin Panter [Thu, 13 Feb 2014 11:18:36 +0000 (11:18 +0000)]
Implement Section.__hash__() to avoid Python 2’s DeprecationWarning
Martin Panter [Thu, 13 Feb 2014 10:53:56 +0000 (10:53 +0000)]
Use integer division in Python 3
This means DwarfConfig.default_address_size is now an integer in Python 3, as
in Python 2.
Eli Bendersky [Wed, 23 Apr 2014 23:44:11 +0000 (16:44 -0700)]
Issue #29: Fail more gracefully when no string table is found for dynamic.
Eli Bendersky [Sun, 30 Mar 2014 13:49:14 +0000 (06:49 -0700)]
Cosmetic changes in TODO
Eli Bendersky [Sun, 30 Mar 2014 13:42:37 +0000 (06:42 -0700)]
Bump version to 0.22 and update TODO a bit
Martin Panter [Wed, 12 Feb 2014 00:09:01 +0000 (00:09 +0000)]
Use tuples with str.endswith(), supported since Python 2.5
Eli Bendersky [Sat, 25 Jan 2014 14:45:37 +0000 (06:45 -0800)]
Clean up the code after the previous pull request
Eli Bendersky [Sat, 25 Jan 2014 14:41:31 +0000 (06:41 -0800)]
Merge pull request #24 from smani/range_lists
Handle absence of .debug_ranges gracefully
Santhosh Kumar Mani [Thu, 23 Jan 2014 15:55:24 +0000 (21:25 +0530)]
Handle absence of .debug_ranges gracefully
Eli Bendersky [Sat, 18 Jan 2014 14:34:37 +0000 (06:34 -0800)]
Adding unit test for an ARM file with DW_FORM_indirect
Eli Bendersky [Sat, 18 Jan 2014 14:24:23 +0000 (06:24 -0800)]
Fix for issue #22: handle DW_FORM_indirect correctly
Eli Bendersky [Sat, 18 Jan 2014 14:17:14 +0000 (06:17 -0800)]
Remove unused import
Eli Bendersky [Sat, 18 Jan 2014 14:15:05 +0000 (06:15 -0800)]
Trim trailing whitespace
Eli Bendersky [Wed, 15 Jan 2014 13:53:07 +0000 (05:53 -0800)]
Attempting fix for issue #22: bad structs reference
Eli Bendersky [Wed, 8 Jan 2014 13:57:43 +0000 (05:57 -0800)]
Minor cleanups after last pull request
Eli Bendersky [Wed, 8 Jan 2014 13:53:26 +0000 (05:53 -0800)]
Merge pull request #10 from yannrouillard/multiple-stringtables-fix
Correctly handle the "multiple string tables" case for string resolution...
Yann Rouillard [Tue, 9 Jul 2013 18:22:27 +0000 (20:22 +0200)]
Correctly handle the "multiple string tables" case for string resolution in the dynamic section
The index of the string table section used to resolve various strings in the
dynamic section is given by the sh_link field in the dynamic section header.
As several string tables with the same name can co-exist in an elf file
we must explicitely look for this specific string table instead of
looking for the first string table in the file.
Eli Bendersky [Sun, 5 Jan 2014 23:53:46 +0000 (15:53 -0800)]
Issue #20: don't fail on relocations creating out-of-bounds values.
This came up with some very large object files. The solution (wrap around at
value size) doesn't feel good, but it appears to be the way binutils does it
too. Are there legitimate cases for this?
Eli Bendersky [Sun, 5 Jan 2014 23:04:02 +0000 (15:04 -0800)]
Additional git-foo for #21
Eli Bendersky [Sun, 5 Jan 2014 23:00:01 +0000 (15:00 -0800)]
Fix for issue #21 - rename test files to keep unittests working from install
Eli Bendersky [Sat, 28 Dec 2013 16:38:53 +0000 (08:38 -0800)]
Merge pull request #18 from ShaheedHaque/fix_iterator3
Use correct Python2/3 compatibility iterator.
Shaheed Haque [Sat, 28 Dec 2013 11:16:53 +0000 (11:16 +0000)]
Use correct Python2/3 compatibility iterator.
Eli Bendersky [Fri, 27 Dec 2013 15:12:50 +0000 (07:12 -0800)]
Update README to point to Travis
Eli Bendersky [Fri, 27 Dec 2013 15:07:06 +0000 (07:07 -0800)]
Update CHANGES
Eli Bendersky [Fri, 27 Dec 2013 15:03:54 +0000 (07:03 -0800)]
Adding test/all_tests.py and a Travis configuration file
Eli Bendersky [Fri, 27 Dec 2013 14:46:03 +0000 (06:46 -0800)]
Update CHANGES
Eli Bendersky [Fri, 27 Dec 2013 14:43:29 +0000 (06:43 -0800)]
Merge pull request #5 from yannrouillard/solaris
add support for solaris additional visibility specifications
Eli Bendersky [Fri, 27 Dec 2013 14:42:50 +0000 (06:42 -0800)]
Merge pull request #7 from yannrouillard/ldynsym
add support for solaris .SUNW_ldynsym section