Skip to content

Commit f1cbfe9

Browse files
committed
Partially revert "[llvm][lld] Support R_AARCH64_GOTPCREL32 (llvm#72584)"
This reverts the MC changes from commit 04a906e, which cause failures when linking with gold on arm64.
1 parent f60e127 commit f1cbfe9

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,7 @@ unsigned AArch64ELFObjectWriter::getRelocType(MCContext &Ctx,
206206
case FK_Data_2:
207207
return R_CLS(ABS16);
208208
case FK_Data_4:
209-
return (!IsILP32 &&
210-
Target.getAccessVariant() == MCSymbolRefExpr::VK_GOTPCREL)
211-
? ELF::R_AARCH64_GOTPCREL32
212-
: R_CLS(ABS32);
209+
return R_CLS(ABS32);
213210
case FK_Data_8: {
214211
bool IsAuth = (RefKind == AArch64MCExpr::VK_AUTH ||
215212
RefKind == AArch64MCExpr::VK_AUTHADDR);

llvm/test/MC/AArch64/elf-reloc-gotpcrel32.s

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// XFAIL: !rdar135050296
2+
13
// RUN: llvm-mc -triple=aarch64 -filetype=obj %s -o - | \
24
// RUN: llvm-readobj -r - | FileCheck %s
35

0 commit comments

Comments
 (0)