[PATCH] D88076: [llvm-readelf/obj] - Stop printing wrong addresses for arm32 unwind info for non-relocatable objects.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 01:43:14 PDT 2020
grimar created this revision.
grimar added reviewers: jhenderson, MaskRay, psmith, rprichard.
Herald added subscribers: rupprecht, kristof.beyls, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
grimar requested review of this revision.
This is the first patch for https://bugs.llvm.org/show_bug.cgi?id=47581.
Currently -u does not compute function addresses correctly and
dumps broken addresses for non-relocatable objects.
ARM spec says:
"An index table entry consists of 2 words.
The first word contains a prel31 offset (see Relocations) to the start of a function, with bit 31 clear."
...
"The relocated 31 bits form a place-relative signed offset to the referenced entity.
For brevity, this document will refer to the results of these relocations as "prel31 offsets"."
(https://developer.arm.com/documentation/ihi0038/c/?lang=en#index-table-entries)
(https://developer.arm.com/documentation/ihi0038/c/?lang=en#relocations)
Currently we use an address of the SHT_ARM_EXIDX section instead of an address of an entry
in computations. As a result we compute an offset that is not really "place-relative",
but section relative, what is wrong.
The patch fixes this issue.
https://reviews.llvm.org/D88076
Files:
llvm/test/tools/llvm-readobj/ELF/ARM/unwind-non-relocatable.test
llvm/tools/llvm-readobj/ARMEHABIPrinter.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88076.293377.patch
Type: text/x-patch
Size: 5483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200922/56ce4ba4/attachment.bin>
More information about the llvm-commits
mailing list