[PATCH] D50632: [LLD][ELF] - Simplify TLS LD handling code.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 03:04:36 PDT 2018


grimar added inline comments.


================
Comment at: ELF/Relocations.cpp:188-189
 
   if (isRelExprOneOf<R_TLSLD_GOT, R_TLSLD_GOT_FROM_END, R_TLSLD_PC,
-                     R_TLSLD_HINT>(Expr)) {
-    // Local-Dynamic relocs can be relaxed to Local-Exec.
+                     R_TLSLD_HINT, R_TLSLD_GOT_OFF, R_ABS>(Expr)) {
     if (!Config->Shared) {
----------------
ruiu wrote:
> I like the new code because it's shorter, but this part looks odd to me, because only `R_ABS` is not a TLSLD type, though other relocations are all TLSLD. So it is hard to judge.
What if I keep logic about `R_ABS` outside? Like in the updated version.


https://reviews.llvm.org/D50632





More information about the llvm-commits mailing list