[PATCH] D88652: [yaml2obj][elf2yaml] - Add a support for the `EntSize` field for `SHT_HASH` sections.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 06:40:26 PDT 2020
grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: hiraditya, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
grimar requested review of this revision.
Specification for SHT_HASH table says (https://refspecs.linuxbase.org/elf/gabi4+/ch5.dynamic.html#hash)
that it contains Elf32_Word entries for both 32/64 bit objects.
Currently both GNU linkers and LLD sets the `sh_entsize` field to `4`.
At the same time, `yaml2obj` ignores the `EntSize` field for SHT_HASH sections.
This patch fixes this and also adds a support for obj2yaml: it will not
dump this field when the `sh_entsize` contains the default value (`4`).
https://reviews.llvm.org/D88652
Files:
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/test/tools/obj2yaml/ELF/hash-section.yaml
llvm/test/tools/yaml2obj/ELF/hash-section.yaml
llvm/test/tools/yaml2obj/ELF/section-headers-exclude.yaml
llvm/tools/obj2yaml/elf2yaml.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88652.295554.patch
Type: text/x-patch
Size: 4955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201001/d4aa6178/attachment.bin>
More information about the llvm-commits
mailing list