From e149b488afd2c189214fb491101a9bb9bbab0c76 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 14 Apr 2016 16:05:42 +0000 Subject: [PATCH] Remove the only case where we would relocate a R_386_TLS_TPOFF. llvm-svn: 266330 --- lld/ELF/Target.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index 2f9e352..58ab226 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -422,7 +422,7 @@ uint32_t X86TargetInfo::getDynRel(uint32_t Type) const { uint32_t X86TargetInfo::getTlsGotRel(uint32_t Type) const { if (Type == R_386_TLS_IE) return Type; - return TlsGotRel; + return R_386_GOT32; } bool X86TargetInfo::isTlsGlobalDynamicRel(uint32_t Type) const { @@ -544,8 +544,7 @@ void X86TargetInfo::relocateOne(uint8_t *Loc, uint32_t Type, break; case R_386_GOT32: case R_386_TLS_GD: - case R_386_TLS_LDM: - case R_386_TLS_TPOFF: { + case R_386_TLS_LDM: { uint64_t V = Val - Out::Got->getVA() - Out::Got->getNumEntries() * 4; checkInt<32>(V, Type); -- 2.7.4