Add support for .note.gnu.property notes section (#386)
authorMarco Bonelli <marco@mebeim.net>
Tue, 7 Dec 2021 14:08:54 +0000 (15:08 +0100)
committerGitHub <noreply@github.com>
Tue, 7 Dec 2021 14:08:54 +0000 (06:08 -0800)
commit5ee4158a08a05ddb24f009363cc4337b8ecaad09
treefd670228b7a5443b7922bae17571ec1ef7b3a95d
parent0a997c1c96705109423936f6e5d60360c2c0f98a
Add support for .note.gnu.property notes section (#386)

* Add support for .note.gnu.properties notes section

References:

- Doc: https://github.com/hjl-tools/linux-abi/wiki/linux-abi-draft.pdf
- Linux: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=00e19ceec80b03a43f626f891fcc53e57919f1b3
- Glibc: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86/dl-prop.h;h=385548fad3e4ad71dbdcdbfada58585c2f24ea5e;hb=HEAD
- Binutils: https://sourceware.org/git/?p=binutils-gdb.git&a=search&h=HEAD&st=commit&s=NT_GNU_PROPERTY_TYPE_0

* Add descriptions for .note.gnu.properties notes

* descriptions: add missing PT_GNU_PROPERTY description

* py3compat: add optional separator for bytes2hex

* readelf: align notes column headers

* elf/descriptions: conform to real readelf's output format

* test: special case some known readelf output quirks

* test: add test ELFs for .note.gnu.property notes
elftools/common/py3compat.py
elftools/elf/descriptions.py
elftools/elf/enums.py
elftools/elf/notes.py
elftools/elf/structs.py
scripts/readelf.py
test/run_readelf_tests.py
test/testfiles_for_readelf/note_gnu_property.S [new file with mode: 0644]
test/testfiles_for_readelf/note_gnu_property.elf [new file with mode: 0755]
test/testfiles_for_readelf/note_gnu_property.o.elf [new file with mode: 0644]