[lld] 6fcc19a - [ELF] Simplify R_TPREL formula after D111365

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 21:03:57 PDT 2021


Author: Fangrui Song
Date: 2021-10-28T21:03:53-07:00
New Revision: 6fcc19afb98959c903909380bc398480d593dbf9

URL: https://github.com/llvm/llvm-project/commit/6fcc19afb98959c903909380bc398480d593dbf9
DIFF: https://github.com/llvm/llvm-project/commit/6fcc19afb98959c903909380bc398480d593dbf9.diff

LOG: [ELF] Simplify R_TPREL formula after D111365

Added: 
    

Modified: 
    lld/ELF/InputSection.cpp

Removed: 
    


################################################################################
diff  --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index de6333162fd6..eafa3f3a460c 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -818,7 +818,7 @@ uint64_t InputSectionBase::getRelocTargetVA(const InputFile *file, RelType type,
     // --noinhibit-exec, even a non-weak undefined reference may reach here.
     // Just return A, which matches R_ABS, and the behavior of some dynamic
     // loaders.
-    if (sym.isUndefined() || sym.isLazy())
+    if (sym.isUndefined())
       return a;
     return getTlsTpOffset(sym) + a;
   case R_RELAX_TLS_GD_TO_LE_NEG:


        


More information about the llvm-commits mailing list