Mark R_AARCH64_PREL32 as relative.

llvm-svn: 261747
This commit is contained in:
Rafael Espindola 2016-02-24 16:15:13 +00:00
parent 064dbac212
commit a4e35f7092
2 changed files with 14 additions and 1 deletions

View File

@ -1209,7 +1209,9 @@ AArch64TargetInfo::AArch64TargetInfo() {
PltZeroSize = 32;
}
bool AArch64TargetInfo::isRelRelative(uint32_t Type) const { return false; }
bool AArch64TargetInfo::isRelRelative(uint32_t Type) const {
return Type == R_AARCH64_PREL32;
}
bool AArch64TargetInfo::isTlsGlobalDynamicRel(unsigned Type) const {
return Type == R_AARCH64_TLSDESC_ADR_PAGE21 ||

View File

@ -0,0 +1,11 @@
// REQUIRES: aarch64
// 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
.Lfoo:
.rodata
.long .Lfoo - .
// CHECK: Relocations [
// CHECK-NEXT: ]