summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Target.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Target.cpp')
-rw-r--r--lld/ELF/Target.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index 96e7d04d304..31e38068863 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -351,7 +351,7 @@ void X86_64TargetInfo::relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type,
write32le(Loc, SA);
break;
case R_X86_64_TPOFF32: {
- uint64_t Val = SA - Out<ELF64LE>::TlsInitImageAlignedSize;
+ uint64_t Val = SA - Out<ELF64LE>::TlsPhdr->p_memsz;
if (!isInt<32>(Val))
error("R_X86_64_TPOFF32 out of range");
write32le(Loc, Val);
OpenPOWER on IntegriCloud