diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-24 19:58:50 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-24 19:58:50 +0000 |
commit | 9a3bb54b2e0ac170b9ff05f0655d43795846502c (patch) | |
tree | cc22132a16d5545ad54bae0184d901766d31610b | |
parent | c36e97ae3977f4f1cc595daac98ff3f845979b13 (diff) | |
download | bcm5719-llvm-9a3bb54b2e0ac170b9ff05f0655d43795846502c.tar.gz bcm5719-llvm-9a3bb54b2e0ac170b9ff05f0655d43795846502c.zip |
R_AARCH64_LDST8_ABS_LO12_NC is effectivelly relative.
It only sets the low bits and given the page alignment of PT_LOAD the
dynamic linker can only change the high ones.
llvm-svn: 261765
-rw-r--r-- | lld/ELF/Target.cpp | 3 | ||||
-rw-r--r-- | lld/test/ELF/aarch64-relative.s | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index 3822eaa7c08..d24bba2f397 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -1220,7 +1220,8 @@ AArch64TargetInfo::AArch64TargetInfo() { } bool AArch64TargetInfo::isRelRelative(uint32_t Type) const { - return Type == R_AARCH64_PREL32 || Type == R_AARCH64_ADR_PREL_PG_HI21; + return Type == R_AARCH64_PREL32 || Type == R_AARCH64_ADR_PREL_PG_HI21 || + Type == R_AARCH64_LDST8_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 43b6c4afbd3..e6a60cc215b 100644 --- a/lld/test/ELF/aarch64-relative.s +++ b/lld/test/ELF/aarch64-relative.s @@ -3,6 +3,7 @@ // RUN: ld.lld %t.o -o %t.so -shared // RUN: llvm-readobj -r %t.so | FileCheck %s adrp x8, .Lfoo + strb w9, [x8, :lo12:.Lfoo] .data .Lfoo: |