From: AG Date: Sun, 26 Nov 2017 13:50:49 +0000 (-0500) Subject: Add TLS and PowerPC to Machine and Program Headers description tables to match binuti... X-Git-Tag: v0.25~26 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88144c45b0ba2dca0596bf11347a9cb394f14e70;p=pyelftools.git Add TLS and PowerPC to Machine and Program Headers description tables to match binutils output (#163) Before: ... Machine: ... Program Headers: ... 0x0bcd0c 0x100ccd0c 0x100ccd0c 0x00000 0x00008 R 0x4 ... After: ... Machine: PowerPC Program Headers: ... TLS 0x0bcd0c 0x100ccd0c 0x100ccd0c 0x00000 0x00008 R 0x4 ... Reproduced and then tested change against statically linked PPC binary produced by MUSL: https://github.com/mzpqnxow/embedded-toolkit/blob/master/prebuilt_static_bins/gdbserver/gdbserver-7.12-ppc-sysv --- diff --git a/elftools/elf/descriptions.py b/elftools/elf/descriptions.py index 4d92730..b40f947 100644 --- a/elftools/elf/descriptions.py +++ b/elftools/elf/descriptions.py @@ -262,6 +262,7 @@ _DESCR_E_MACHINE = dict( EM_ARM='ARM', EM_AARCH64='AArch64', EM_BLAFKIN='Analog Devices Blackfin', + EM_PPC='PowerPC', RESERVED='RESERVED', ) @@ -281,6 +282,7 @@ _DESCR_P_TYPE = dict( PT_ARM_EXIDX='ARM_EXIDX', PT_AARCH64_ARCHEXT='AARCH64_ARCHEXT', PT_AARCH64_UNWIND='AARCH64_UNWIND', + PT_TLS='TLS' )