From 47ed542328676a01b694de6a8d893723c3fdb7a1 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 24 Feb 2016 21:48:06 +0000 Subject: [PATCH] Mark R_AARCH64_ADD_ABS_LO12_NC as relative. llvm-svn: 261772 --- lld/ELF/Target.cpp | 3 ++- lld/test/ELF/aarch64-relative.s | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index baf7140..02af466 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -1223,7 +1223,8 @@ bool AArch64TargetInfo::isRelRelative(uint32_t Type) const { return Type == R_AARCH64_PREL32 || Type == R_AARCH64_ADR_PREL_PG_HI21 || Type == R_AARCH64_LDST8_ABS_LO12_NC || Type == R_AARCH64_LDST32_ABS_LO12_NC || - Type == R_AARCH64_LDST64_ABS_LO12_NC; + Type == R_AARCH64_LDST64_ABS_LO12_NC || + Type == R_AARCH64_ADD_ABS_LO12_NC; } bool AArch64TargetInfo::isTlsGlobalDynamicRel(unsigned Type) const { diff --git a/lld/test/ELF/aarch64-relative.s b/lld/test/ELF/aarch64-relative.s index 11014ef..6d8e19f 100644 --- a/lld/test/ELF/aarch64-relative.s +++ b/lld/test/ELF/aarch64-relative.s @@ -6,6 +6,7 @@ strb w9, [x8, :lo12:.Lfoo] ldr w0, [x8, :lo12:.Lfoo] ldr x0, [x8, :lo12:.Lfoo] + add x0, x0, :lo12:.Lfoo .data .Lfoo: -- 2.7.4