[lld] [lld][LoongArch] GOT indirection to PC relative optimization (PR #123743)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 29 20:12:08 PDT 2025


================
@@ -1167,28 +1167,49 @@ void LoongArch::tlsdescToLe(uint8_t *loc, const Relocation &rel,
 // complexity.
 bool LoongArch::tryGotToPCRel(uint8_t *loc, const Relocation &rHi20,
----------------
MaskRay wrote:

> It seems that the term "linker optimization" is often used when the number of bytes does not change while "linker relaxation" is used when the number of bytes decreases.

While x86-64 and s390x don't have linker relaxation, they do support --no-relax. --no-relax is useful to disable this optimization.

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


More information about the llvm-commits mailing list