diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index a1b81cc80267b3723e4c814a57872e57a513d8d7..2f9e3525ce2ca56e652e07a9cbb93e386a61346f 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -532,13 +532,6 @@ void X86TargetInfo::relocateOne(uint8_t *Loc, uint32_t Type, case R_386_32: write32le(Loc, Val); break; - case R_386_GOT32: { - uint64_t V = Val - Out::Got->getVA() - - Out::Got->getNumEntries() * 4; - checkInt<32>(V, Type); - write32le(Loc, V); - break; - } case R_386_GOTOFF: write32le(Loc, Val - Out::Got->getVA()); break; @@ -549,6 +542,7 @@ void X86TargetInfo::relocateOne(uint8_t *Loc, uint32_t Type, case R_386_PLT32: write32le(Loc, Val); break; + case R_386_GOT32: case R_386_TLS_GD: case R_386_TLS_LDM: case R_386_TLS_TPOFF: {