[PATCH] D62577: [ELF] Support Local Dynamic style TLSDESC for x86-64

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 01:53:57 PDT 2019


grimar added inline comments.


================
Comment at: ELF/Writer.cpp:1626
+                         /*Section=*/nullptr});
+    Symtab->TlsModuleBase = S;
+  }
----------------
grimar wrote:
> Should this assignment be under `if (S && S->isUndefined())` check?
> 
> I am not sure how much is real (I guess not at all honestly). but if user defines his own `_TLS_MODULE_BASE_` symbol, then
> with the current code `getTlsTpOffset` would return 0 for it. It is probably not user would expect.
i.e.


```
if (S && S->isUndefined()) {
  S->resolve(Defined{/*File=*/nullptr, S->getName(), STB_GLOBAL, STV_HIDDEN,
                         STT_TLS, /*Value=*/0, 0,
                         /*Section=*/nullptr});
  Symtab->TlsModuleBase = S;
}
```


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62577/new/

https://reviews.llvm.org/D62577





More information about the llvm-commits mailing list