[lld] [ELF] Handle and optimize x86-64 PLTOFF64 TLS sequences (PR #216263)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 03:21:10 PDT 2026


================
@@ -830,6 +850,18 @@ void X86_64::relaxTlsGdToLe(uint8_t *loc, const Relocation &rel,
 void X86_64::relaxTlsGdToIe(uint8_t *loc, const Relocation &rel,
                             uint64_t val) const {
   if (rel.type == R_X86_64_TLSGD) {
+    if (isPltOff64Tls(loc)) {
----------------
smithp35 wrote:

Similar comment to the relaxTLSGdToIe, could we use the // Convert style comment as it makes it easier to understand the loc - 3 without looking up to the `isPltOff64Tls`

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


More information about the llvm-commits mailing list