summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Target.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index 9ca290e912b..1cfe1e3019a 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -1459,11 +1459,9 @@ void MipsTargetInfo<ELFT>::relocateOne(uint8_t *Loc, uint32_t Type,
case R_MIPS_64:
write64<E>(Loc, Val);
break;
- case R_MIPS_26: {
- uint32_t Instr = read32<E>(Loc);
- write32<E>(Loc, (Instr & ~0x3ffffff) | (Val >> 2));
+ case R_MIPS_26:
+ write32<E>(Loc, (read32<E>(Loc) & ~0x3ffffff) | (Val >> 2));
break;
- }
case R_MIPS_GOT_DISP:
case R_MIPS_GOT_PAGE:
case R_MIPS_GOT16:
OpenPOWER on IntegriCloud