[lld] 61bccda - [LLD][ELF][ARM] Convert ADR/LDR to .inst .reloc
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 20 06:01:40 PDT 2020
Author: Peter Smith
Date: 2020-04-20T13:59:05+01:00
New Revision: 61bccda9d9d920c72f49025f11e8601daeb096ec
URL: https://github.com/llvm/llvm-project/commit/61bccda9d9d920c72f49025f11e8601daeb096ec
DIFF: https://github.com/llvm/llvm-project/commit/61bccda9d9d920c72f49025f11e8601daeb096ec.diff
LOG: [LLD][ELF][ARM] Convert ADR/LDR to .inst .reloc
After D78301 MC no longer emits a relocation for this case. Change to use
.inst and .reloc to synthesize the same instruction and relocation.
Added:
Modified:
lld/test/ELF/arm-thumb-undefined-weak.s
Removed:
################################################################################
diff --git a/lld/test/ELF/arm-thumb-undefined-weak.s b/lld/test/ELF/arm-thumb-undefined-weak.s
index 9c9626cfc4a9..6cc26cfb8784 100644
--- a/lld/test/ELF/arm-thumb-undefined-weak.s
+++ b/lld/test/ELF/arm-thumb-undefined-weak.s
@@ -28,9 +28,13 @@ _start:
/// R_ARM_THM_MOVW_PREL_NC
movw r0, :lower16:target - .
/// R_ARM_THM_ALU_PREL_11_0
- adr r0, target
+/// adr r0, target
+ .inst.w 0xf2af0004
+ .reloc 0x18, R_ARM_THM_ALU_PREL_11_0, target
/// R_ARM_THM_PC12
- ldr r0, target
+/// ldr r0, target
+ .inst.w 0xf85f0004
+ .reloc 0x1c, R_ARM_THM_PC12, target
// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// CHECK: 200b4: {{.*}} beq.w #0 <_start+0x4>
More information about the llvm-commits
mailing list