summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Target.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index 240eb983c5a..6246ad19472 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<ELF32LE>::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<ELF32LE>::TlsPhdr->p_memsz);
break;
OpenPOWER on IntegriCloud