[lldb][ObjectFileELF] Support AArch32 in ApplyRelocations
commit64a2520bacb59dac43bb4fd19ff1788d785102de
authorStefan Gränitz <stefan.graenitz@gmail.com>
Sat, 29 Apr 2023 15:29:28 +0000 (29 17:29 +0200)
committerStefan Gränitz <stefan.graenitz@gmail.com>
Sat, 29 Apr 2023 15:34:39 +0000 (29 17:34 +0200)
treee5532ee435bbdc3b225b488b94cedacaca07557b
parentd605af371e2ab69be032f7f4ee854baded688b5a
[lldb][ObjectFileELF] Support AArch32 in ApplyRelocations

Allow the ObjectFileELF plugin to resolve R_ARM_ABS32 relocations from AArch32 object files. This fixes https://github.com/llvm/llvm-project/issues/61948

The existing architectures work with RELA-type relocation records that read addend from the relocation entry. REL-type relocations in AArch32 store addend in-place.
The new function doesn't re-use ELFRelocation::RelocAddend32(), because the interface doesn't match: in addition to the relocation entry we need the actual target section memory.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D147642
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/test/Shell/ObjectFile/ELF/aarch32-relocations.yaml [new file with mode: 0644]