Skip to content

Commit

Permalink
Partially revert "[llvm][lld] Support R_AARCH64_GOTPCREL32 (llvm#72584)"
Browse files Browse the repository at this point in the history
This reverts the MC changes from commit
04a906e, which cause failures when
linking with gold on arm64.
  • Loading branch information
bnbarham committed Sep 24, 2024
1 parent f60e127 commit f1cbfe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,7 @@ unsigned AArch64ELFObjectWriter::getRelocType(MCContext &Ctx,
case FK_Data_2:
return R_CLS(ABS16);
case FK_Data_4:
return (!IsILP32 &&
Target.getAccessVariant() == MCSymbolRefExpr::VK_GOTPCREL)
? ELF::R_AARCH64_GOTPCREL32
: R_CLS(ABS32);
return R_CLS(ABS32);
case FK_Data_8: {
bool IsAuth = (RefKind == AArch64MCExpr::VK_AUTH ||
RefKind == AArch64MCExpr::VK_AUTHADDR);
Expand Down
2 changes: 2 additions & 0 deletions llvm/test/MC/AArch64/elf-reloc-gotpcrel32.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// XFAIL: !rdar135050296

// RUN: llvm-mc -triple=aarch64 -filetype=obj %s -o - | \
// RUN: llvm-readobj -r - | FileCheck %s

Expand Down

0 comments on commit f1cbfe9

Please sign in to comment.