diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index 240eb983c5a9..6246ad194727 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -528,6 +528,10 @@ void X86TargetInfo::relocateOne(uint8_t *Loc, uint32_t Type, uint64_t Val) const { switch (Type) { case R_386_32: + case R_386_PC32: + case R_386_PLT32: + case R_386_TLS_IE: + case R_386_TLS_LDO_32: write32le(Loc, Val); break; case R_386_GOTOFF: @@ -536,10 +540,6 @@ void X86TargetInfo::relocateOne(uint8_t *Loc, uint32_t Type, case R_386_GOTPC: write32le(Loc, Val + Out::Got->getVA()); break; - case R_386_PC32: - case R_386_PLT32: - write32le(Loc, Val); - break; case R_386_GOT32: case R_386_TLS_GD: case R_386_TLS_LDM: { @@ -549,10 +549,6 @@ void X86TargetInfo::relocateOne(uint8_t *Loc, uint32_t Type, write32le(Loc, V); break; } - case R_386_TLS_IE: - case R_386_TLS_LDO_32: - write32le(Loc, Val); - break; case R_386_TLS_LE: write32le(Loc, Val - Out::TlsPhdr->p_memsz); break;