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

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 3 18:27:36 PDT 2018


ruiu 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) {
----------------
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.


https://reviews.llvm.org/D50632





More information about the llvm-commits mailing list