summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputSection.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-29 02:03:56 +0000
committerFangrui Song <maskray@google.com>2019-05-29 02:03:56 +0000
commit719322411ce62662bcd3bdc5ee9deb6c2c84ffb7 (patch)
tree961e95fb289dd1f42063dee907367165c78c0b23 /lld/ELF/InputSection.cpp
parent656afe370df3ac374db7624e0b450f15a2212ab2 (diff)
downloadbcm5719-llvm-719322411ce62662bcd3bdc5ee9deb6c2c84ffb7.tar.gz
bcm5719-llvm-719322411ce62662bcd3bdc5ee9deb6c2c84ffb7.zip
[ELF] Implement General Dynamic style TLSDESC for x86-64
This handles two initial relocation types R_X86_64_GOTPC32_TLSDESC and R_X86_64_TLSDESC_CALL, as well as the GD->LE and GD->IE relaxations. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62513 llvm-svn: 361911
Diffstat (limited to 'lld/ELF/InputSection.cpp')
-rw-r--r--lld/ELF/InputSection.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index 74878931afb..9075568f8c1 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -755,6 +755,8 @@ static uint64_t getRelocTargetVA(const InputFile *File, RelType Type, int64_t A,
return Sym.getSize() + A;
case R_TLSDESC:
return In.Got->getGlobalDynAddr(Sym) + A;
+ case R_TLSDESC_PC:
+ return In.Got->getGlobalDynAddr(Sym) + A - P;
case R_AARCH64_TLSDESC_PAGE:
return getAArch64Page(In.Got->getGlobalDynAddr(Sym) + A) -
getAArch64Page(P);
OpenPOWER on IntegriCloud