eliben / pyelftools

Parsing ELF and DWARF in Python
Other
2.03k stars 512 forks source link

Missing DT_MIPS_XHASH #569

Closed rossburton closed 1 month ago

rossburton commented 1 month ago

ENUM_D_TAG_COMMON is missing an entry for DT_MIPS_XHASH. For reasons best known to the binutils maintainers this isn't defined in the common elf.h but is defined and used in elf.c (and present in compiled MIPS binaries):

bfd/elf.c:#define DT_MIPS_XHASH          0x70000036

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/elf.c;h=7d3d2063130bd3d5bd988207ca68b15f76ac85c8;hb=HEAD#l1760

LLVM has the same definition:

llvm/include/llvm/BinaryFormat/DynamicTags.def:MIPS_DYNAMIC_TAG(MIPS_XHASH, 0x70000036)        // GNU-style hash table with xlat.
sevaa commented 1 month ago

@rossburton This was addressed.

eliben commented 1 month ago

If this is fixed by https://github.com/eliben/pyelftools/pull/571, the issue can be closed

rossburton commented 1 month ago

Looks right to me.