summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputSection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/InputSection.cpp')
-rw-r--r--lld/ELF/InputSection.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index 5916ad7f558..afb373decc6 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -126,6 +126,14 @@ void InputSectionBase<ELFT>::relocate(
}
SymbolBody &Body = *File->getSymbolBody(SymIndex)->repl();
+
+ if (Type == Target->getTlsGlobalDynamicReloc()) {
+ Target->relocateOne(BufLoc, BufEnd, Type, AddrLoc,
+ Out<ELFT>::Got->getEntryAddr(Body) +
+ getAddend<ELFT>(RI));
+ continue;
+ }
+
uintX_t SymVA = getSymVA<ELFT>(Body);
if (Target->relocNeedsPlt(Type, Body)) {
SymVA = Out<ELFT>::Plt->getEntryAddr(Body);
OpenPOWER on IntegriCloud