[lld] ELF,SystemZ: Don't sort relocations for TLS GD/LD optimization; support CREL (PR #149640)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 21 09:29:07 PDT 2025


MaskRay wrote:

> I guess I'd be OK with this. It would still be nicer if this false dependency could be avoided. Not sure what CREL has to do with relocation sorting: is the problem indeed the swap of these two TLS-related relocs, or is the problem that generic sorting also introduces other changes? If the latter, maybe we could just swap those TLS relocs instead of a generic sorting path? Or simply allow a more generic relocation-skipping mechanism that allows skipping the reloc _before_ a TLS reloc as well as the reloc after the TLS reloc?

CREL does not support random access. To allow the GDCALL/PLT32, we would need to decode them to RELA and sort them first...

https://github.com/llvm/llvm-project/pull/149640


More information about the llvm-commits mailing list