Files
clang-p2996/llvm/lib/Target/SystemZ/MCTargetDesc
Fangrui Song 68472a39a0 [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()` (086af83688).

38c3ad36be 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
(38c3ad36be) 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`
a3d3931676 added missing coverage
for GOT/PLT related relocations.
2025-05-22 09:49:27 -07:00
..