diff options
author | Peter Smith <peter.smith@arm.com> | 2020-02-23 10:49:51 +0000 |
---|---|---|
committer | Peter Smith <peter.smith@arm.com> | 2020-02-28 11:29:29 +0000 |
commit | 2a92fc9b8e6a079acd53ec3675cfd9bb153ab1ea (patch) | |
tree | e1a5b528134bf11e65c36a3ff48a4b4f84e1f97f /llvm/unittests/CodeGen/MachineInstrTest.cpp | |
parent | 46bfc2bc01e01013522075271531c1687ea4f468 (diff) | |
download | llvm-2a92fc9b8e6a079acd53ec3675cfd9bb153ab1ea.zip llvm-2a92fc9b8e6a079acd53ec3675cfd9bb153ab1ea.tar.gz llvm-2a92fc9b8e6a079acd53ec3675cfd9bb153ab1ea.tar.bz2 |
[MC][ELF][ARM] Add relocations for some pc-relative fixups
Add ELF relocations for the following fixups:
fixup_thumb_adr_pcrel_10 -> R_ARM_THM_PC8
fixup_thumb_cp -> R_ARM_THM_PC8
fixup_t2_adr_pcrel_12 -> R_ARM_THM_PREL_11_0
fixup_t2_ldst_pcrel_12 -> R_ARM_THM_PC12
While these relocations are short-ranged there is support in the open
source ELF linker's in binutils and soon to be in LLD. MC will no longer
resolve pc-relative fixups to global symbols due to interpositioning
concerns. We can handle these at link time by implementing the relocations.
The R_ARM_THM_PC8 has some extra encoding rules for addends that llvm-mc
sidesteps by not supporting addends for these instructions, using the wide
Thumb 2 instruction if it is available. I think that this is a reasonable
compromise given that these are rare.
This partiall reverts D72892, the Thumb fixups no longer need to be
evaluated at assembly time.
Differential Revision: https://reviews.llvm.org/D75039
Diffstat (limited to 'llvm/unittests/CodeGen/MachineInstrTest.cpp')
0 files changed, 0 insertions, 0 deletions