aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-05-22 09:49:27 -0700
committerFangrui Song <i@maskray.me>2025-05-22 09:49:27 -0700
commit68472a39a0fbf38f5da7bb4ebe43e2ca87ff8308 (patch)
tree19aa378027721d116a71d8810d7f20e4d3896e26 /clang/lib/Frontend/CompilerInvocation.cpp
parent586e1dffd8d2fab0b4f386c51eff23f3640f45d9 (diff)
downloadllvm-68472a39a0fbf38f5da7bb4ebe43e2ca87ff8308.zip
llvm-68472a39a0fbf38f5da7bb4ebe43e2ca87ff8308.tar.gz
llvm-68472a39a0fbf38f5da7bb4ebe43e2ca87ff8308.tar.bz2
[MC] Restore MCAsmBackend::shouldForceRelocation to false
For IsPCRel fixups, we had the `A->getKind() != MCSymbolRefExpr::VK_None` condition to force relocations. The condition has then been changed to `Target.getSpecifier()` (086af836889436baffc71c743c7c8259bad8ed60). 38c3ad36be1facbe6db2dede7e93c0f12fb4e1dc updated shouldForceRelocation to test `Target.getSpecifier`. It is not a good fit as many targets with %lo/%hi style specifiers (SPARC, MIPS, PowerPC, RISC-V) do not force relocations for these specifiers. Revert the Target.getSpecifier implementation (38c3ad36be1facbe6db2dede7e93c0f12fb4e1dc) and update targets that need it (SystemZAsmBackend/X86AsmBackend) instead. Targets need customization might define addReloc instead. Note: The X86AsmBackend implementation is too conservative. GNU Assembler doesn't emit a relocation for `call local@plt; local` a3d39316764726ed9fd939550c7781199b1eb77e added missing coverage for GOT/PLT related relocations.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions