Skip to content

Partially revert "[llvm][lld] Support R_AARCH64_GOTPCREL32 (#72584)" #9288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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