Skip to content

Commit 40afcb5

Browse files
committed
Mark R_AARCH64_LDST32_ABS_LO12_NC as relative.
llvm-svn: 261766
1 parent 9a3bb54 commit 40afcb5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lld/ELF/Target.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,8 @@ AArch64TargetInfo::AArch64TargetInfo() {
12211221

12221222
bool AArch64TargetInfo::isRelRelative(uint32_t Type) const {
12231223
return Type == R_AARCH64_PREL32 || Type == R_AARCH64_ADR_PREL_PG_HI21 ||
1224-
Type == R_AARCH64_LDST8_ABS_LO12_NC;
1224+
Type == R_AARCH64_LDST8_ABS_LO12_NC ||
1225+
Type == R_AARCH64_LDST32_ABS_LO12_NC;
12251226
}
12261227

12271228
bool AArch64TargetInfo::isTlsGlobalDynamicRel(unsigned Type) const {

lld/test/ELF/aarch64-relative.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: llvm-readobj -r %t.so | FileCheck %s
55
adrp x8, .Lfoo
66
strb w9, [x8, :lo12:.Lfoo]
7+
ldr w0, [x8, :lo12:.Lfoo]
78

89
.data
910
.Lfoo:

0 commit comments

Comments
 (0)