Enhance MIPS64 testing and simplify handling code for its peculiar relocations (...
authorPierre-Marie de Rodat <pmderodat@kawie.fr>
Tue, 17 Mar 2020 12:01:45 +0000 (13:01 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Mar 2020 12:01:45 +0000 (05:01 -0700)
commit3156d6f88feb85ad4ceaf142e9831b494a1f6e0b
tree3e4b49c5199d8c56a47a6625b6915eefbae77875
parent6ac99ad24c4db5f08ba24b089949918bc8973806
Enhance MIPS64 testing and simplify handling code for its peculiar relocations (#300)

* Add handling for SHF_MASKOS section flags

* Add readelf testcases for MIPS64 specificities

* Simplify the decoding of MIPS64 relocations

Instead of using "fake" fields to parse the relocation structure and
then use complex shift/masks to recover the conveyed information (once
for big endian binaries, twice for little endian ones), use fields
actually described in the spec and use straightforward shifts to
synthetize the "fake" fields.
elftools/elf/descriptions.py
elftools/elf/structs.py
test/testfiles_for_readelf/mips64-relocs-be.o.elf [new file with mode: 0644]
test/testfiles_for_readelf/mips64-relocs-le.o.elf [new file with mode: 0644]
test/testfiles_for_readelf/mips64-relocs.c [new file with mode: 0644]