[lld] r261764 - R_AARCH64_ADR_PREL_PG_HI21 is relative.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 11:36:30 PST 2016
Author: rafael
Date: Wed Feb 24 13:36:30 2016
New Revision: 261764
URL: http://llvm.org/viewvc/llvm-project?rev=261764&view=rev
Log:
R_AARCH64_ADR_PREL_PG_HI21 is relative.
Modified:
lld/trunk/ELF/Target.cpp
lld/trunk/test/ELF/aarch64-relative.s
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=261764&r1=261763&r2=261764&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Wed Feb 24 13:36:30 2016
@@ -1220,7 +1220,7 @@ AArch64TargetInfo::AArch64TargetInfo() {
}
bool AArch64TargetInfo::isRelRelative(uint32_t Type) const {
- return Type == R_AARCH64_PREL32;
+ return Type == R_AARCH64_PREL32 || Type == R_AARCH64_ADR_PREL_PG_HI21;
}
bool AArch64TargetInfo::isTlsGlobalDynamicRel(unsigned Type) const {
Modified: lld/trunk/test/ELF/aarch64-relative.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-relative.s?rev=261764&r1=261763&r2=261764&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-relative.s (original)
+++ lld/trunk/test/ELF/aarch64-relative.s Wed Feb 24 13:36:30 2016
@@ -2,8 +2,11 @@
// RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t.o
// RUN: ld.lld %t.o -o %t.so -shared
// RUN: llvm-readobj -r %t.so | FileCheck %s
+ adrp x8, .Lfoo
+ .data
.Lfoo:
+
.rodata
.long .Lfoo - .
More information about the llvm-commits
mailing list