Attached are some improvements to the ELF parser.
There are two attachments: one contains patches which change ElfFile? to use SeekableFieldSet?, and the other one has everything the first patch has minus SFS dependant edits.
Changes:
Fix descriptions for a few fields (they were incorrect or very misleading)
Fix minor technical issues (wrong padding size leading to a non-existant field being added, "align" field in the wrong place, etc.)
Added many values to the enums
Added "SectionHeader?32Flags" which is simply a description wrapper around UInt32, which interprets the flags given (this is NOT a bit field because the bits are stored within the value of the integer, and hence, for big-endian integers, cannot be parsed as bitfields)
Added a TypeNameClass? class which is a wrapper around dict, allowing it to assume certain descriptions for large ranges of values (0x70000000 to 0xFFFFFFFF)
Added some interpretation of link & info fields
SeekableFieldSet?-only changes:
Added ability to read (but not yet parse) section data (interleaved with the section headers) -- parsing section data should be very simple with the modifications made
Added proper names to the description; this causes some problems in Hachoir-wx (first time it loads, it skips all field between the first section header and the section header string table; refreshing the view by any means fixes it). This bug can be worked out in the future.
Note that the two patches are not meant to be applied incrementally; instead, if you like the SFS changes, apply the SFS patch, otherwise, apply the non-SFS patch.