Skip to content
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,7 +206,10 @@ unsigned AArch64ELFObjectWriter::getRelocType(MCContext &Ctx,
case FK_Data_2:
return R_CLS(ABS16);
case FK_Data_4:
return R_CLS(ABS32);
return (!IsILP32 &&
Target.getAccessVariant() == MCSymbolRefExpr::VK_GOTPCREL)
? ELF::R_AARCH64_GOTPCREL32
: R_CLS(ABS32);
case FK_Data_8: {
bool IsAuth = (RefKind == AArch64MCExpr::VK_AUTH ||
RefKind == AArch64MCExpr::VK_AUTHADDR);
Expand Down
2 changes: 0 additions & 2 deletions llvm/test/MC/AArch64/elf-reloc-gotpcrel32.s
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// XFAIL: !rdar135050296

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

Expand Down