[PATCH] D88228: [yaml2obj][obj2yaml] - Add a support for SHT_ARM_EXIDX section.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 06:49:37 PDT 2020
grimar created this revision.
grimar added reviewers: jhenderson, MaskRay, psmith.
Herald added subscribers: hiraditya, kristof.beyls, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
grimar requested review of this revision.
[yaml2obj][obj2yaml] - Add a support for SHT_ARM_EXIDX section.
This adds the support for SHT_ARM_EXIDX sections to obj2yaml/yaml2obj tools.
SHT_ARM_EXIDX is a ARM specific index table filled with entries.
Each entry consists of two 4-bytes values (words).
(https://developer.arm.com/documentation/ihi0038/c/?lang=en#index-table-entries)
Note: I am not sure if we should respect endianness for these words.
This patch does. But seems everywhere in LLVM they are written/read as LE.
At the same time GNU readelf -u behaves differently for a section that is described as:
- Name: .ARM.exidx
Type: SHT_ARM_EXIDX
Content: "00000000000000010000000001000000"
For a little endian object it dumps:
> readelf -u test.o
Unwind section '.ARM.exidx' at offset 0x40 contains 1 entry:
0x0: @0x1000004
readelf: Warning: Could not locate .ARM.extab section containing 0x1000004.
0x8: 0x1 [cantunwind]
And for a big endian:
> readelf -u test.o
Unwind section '.ARM.exidx' at offset 0x40 contains 1 entry:
0x0: 0x1 [cantunwind]
0x8: @0x100000c
readelf: Warning: Could not locate .ARM.extab section containing 0x100000c.
I also haven't found in specification that these values must always be little-endian.
https://reviews.llvm.org/D88228
Files:
llvm/include/llvm/ObjectYAML/ELFYAML.h
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/obj2yaml/ELF/arm-exidx-section.yaml
llvm/test/tools/yaml2obj/ELF/arm-exidx-section.yaml
llvm/tools/obj2yaml/elf2yaml.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88228.294037.patch
Type: text/x-patch
Size: 18203 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200924/e5f23f45/attachment.bin>
More information about the llvm-commits
mailing list