summaryrefslogtreecommitdiff
path: root/lld/ELF/InputSection.cpp
diff options
context:
space:
mode:
authorSean Fertile <sfertile@ca.ibm.com>2018-05-31 18:44:12 +0000
committerSean Fertile <sfertile@ca.ibm.com>2018-05-31 18:44:12 +0000
commit5d09772fd8f62234c6651f314732ac8fa6baea30 (patch)
tree50fecbce3e3b572c987ae1470fa0c857f11e9bd0 /lld/ELF/InputSection.cpp
parentcaba7e8751c3be10d5c0f4269a522dadff0afb27 (diff)
[PPC64] Support R_PPC64_GOT_TLSLD16 relocations.
Add support for the R_PPC64_GOT_TLSLD16 relocations used to build the address of the tls_index struct used in local-dynamic tls. Differential Revision: https://reviews.llvm.org/D47538
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 ad8cbfa6880..09bc39eaed1 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -639,6 +639,8 @@ static uint64_t getRelocTargetVA(RelType Type, int64_t A, uint64_t P,
return InX::Got->getGlobalDynAddr(Sym) + A - P;
case R_TLSLD_GOT_FROM_END:
return InX::Got->getTlsIndexOff() + A - InX::Got->getSize();
+ case R_TLSLD_GOT:
+ return InX::Got->getTlsIndexOff() + A;
case R_TLSLD_PC:
return InX::Got->getTlsIndexVA() + A - P;
}