Compressed sections (#152)
authorPierre-Marie de Rodat <pmderodat@kawie.fr>
Thu, 17 Aug 2017 03:52:45 +0000 (05:52 +0200)
committerEli Bendersky <eliben@users.noreply.github.com>
Thu, 17 Aug 2017 03:52:45 +0000 (20:52 -0700)
commit1d7e6945d939197aa722fcd909522c079c69aa3c
tree9a73d4d62c71713836892be770f9c535aa5b5cd4
parent950b40ea13696b69fbcab011dbbc6c757c4baf3f
Compressed sections (#152)

* Add constants, enums and structs for compressed section

* ELFStructs: update comments for new section numbers in Oracle docs

* Make the ELFFile's stream/structs available to all Section instances

This harmonizes the signature of Section constructors. Besides, structs
will be required to read compressed sections.

* ELFFile._read_dwarf_section: use Section.data to read the section

An upcoming change will add compressed sections handling. In this
context, the DWARF must be parsed from the decompressed data, so reading
the ELFFile stream will be wrong.

* Add ELF compressed debug sections handling
15 files changed:
elftools/common/exceptions.py
elftools/elf/constants.py
elftools/elf/dynamic.py
elftools/elf/elffile.py
elftools/elf/enums.py
elftools/elf/gnuversions.py
elftools/elf/relocation.py
elftools/elf/sections.py
elftools/elf/structs.py
test/test_compressed_support.py [new file with mode: 0644]
test/testfiles_for_unittests/compressed.c [new file with mode: 0644]
test/testfiles_for_unittests/compressed_32.o [new file with mode: 0644]
test/testfiles_for_unittests/compressed_64.o [new file with mode: 0644]
test/testfiles_for_unittests/compressed_bad_size.o [new file with mode: 0644]
test/testfiles_for_unittests/compressed_unknown_type.o [new file with mode: 0644]