[lld] b2a3d31 - [ELF] Simplify R_386_TLS_GD computation. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 16 19:08:29 PDT 2021
Author: Fangrui Song
Date: 2021-04-16T19:08:23-07:00
New Revision: b2a3d31eed3b70baf2b8123d940cadb6139d8f2b
URL: https://github.com/llvm/llvm-project/commit/b2a3d31eed3b70baf2b8123d940cadb6139d8f2b
DIFF: https://github.com/llvm/llvm-project/commit/b2a3d31eed3b70baf2b8123d940cadb6139d8f2b.diff
LOG: [ELF] Simplify R_386_TLS_GD computation. NFC
Added:
Modified:
lld/ELF/InputSection.cpp
Removed:
################################################################################
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index 0ee1b0885d66..17fa7db15088 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -839,7 +839,7 @@ uint64_t InputSectionBase::getRelocTargetVA(const InputFile *file, RelType type,
case R_TLSGD_GOT:
return in.got->getGlobalDynOffset(sym) + a;
case R_TLSGD_GOTPLT:
- return in.got->getVA() + in.got->getGlobalDynOffset(sym) + a - in.gotPlt->getVA();
+ return in.got->getGlobalDynAddr(sym) + a - in.gotPlt->getVA();
case R_TLSGD_PC:
return in.got->getGlobalDynAddr(sym) + a - p;
case R_TLSLD_GOTPLT:
More information about the llvm-commits
mailing list