[PATCH] D75347: [MC][ELF][ARM] Add relocations for some ARM pc-relative fixups.
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 05:53:47 PST 2020
psmith created this revision.
psmith added reviewers: MaskRay, ostannard, eli.friedman.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: LLVM.
Add ELF relocations for the following fixups:
- fixup_arm_ldst_pcrel_12 -> R_ARM_LDR_PC_G0
- fixup_arm_adr_pcrel_12 -> R_ARM_ALU_PC_G0
These relocations map to the pseudo instructions:
- ldr rd, label
- adr rd, label
They are short ranged and normally resolved by the fixup, however MC will no longer resolve the fixups to global symbols due to interpositioning concerns. We can handle these at link time by implementing the relocations.
This is the ARM equivalent of D75039 <https://reviews.llvm.org/D75039>, LLD patch implementing the relocations will be submitted later today.
https://reviews.llvm.org/D75347
Files:
llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
llvm/test/MC/ARM/arm-relax-adr.s
llvm/test/MC/ARM/arm-relax-ldrlit.s
llvm/test/MC/ARM/pcrel-global-rel.s
llvm/test/MC/ARM/pcrel-global.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75347.247240.patch
Type: text/x-patch
Size: 4310 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200228/6c30374b/attachment.bin>
More information about the llvm-commits
mailing list