R_AARCH64_ADR_PREL_PG_HI21 is relative.

llvm-svn: 261764
This commit is contained in:
Rafael Espindola 2016-02-24 19:36:30 +00:00
parent aca625a4fe
commit c36e97ae39
2 changed files with 4 additions and 1 deletions

View File

@ -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 {

View File

@ -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 - .