Mark R_AARCH64_LDST32_ABS_LO12_NC as relative.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 24 Feb 2016 20:18:06 +0000 (20:18 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 24 Feb 2016 20:18:06 +0000 (20:18 +0000)
llvm-svn: 261766

lld/ELF/Target.cpp
lld/test/ELF/aarch64-relative.s

index d24bba2..5b05dfe 100644 (file)
@@ -1221,7 +1221,8 @@ AArch64TargetInfo::AArch64TargetInfo() {
 
 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_LDST8_ABS_LO12_NC ||
+         Type == R_AARCH64_LDST32_ABS_LO12_NC;
 }
 
 bool AArch64TargetInfo::isTlsGlobalDynamicRel(unsigned Type) const {
index e6a60cc..7c2e9de 100644 (file)
@@ -4,6 +4,7 @@
 // RUN: llvm-readobj -r %t.so | FileCheck %s
         adrp    x8, .Lfoo
         strb    w9, [x8, :lo12:.Lfoo]
+        ldr     w0, [x8, :lo12:.Lfoo]
 
         .data
         .Lfoo: