diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index 9ca290e912b2..1cfe1e3019a1 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -1459,11 +1459,9 @@ void MipsTargetInfo::relocateOne(uint8_t *Loc, uint32_t Type, case R_MIPS_64: write64(Loc, Val); break; - case R_MIPS_26: { - uint32_t Instr = read32(Loc); - write32(Loc, (Instr & ~0x3ffffff) | (Val >> 2)); + case R_MIPS_26: + write32(Loc, (read32(Loc) & ~0x3ffffff) | (Val >> 2)); break; - } case R_MIPS_GOT_DISP: case R_MIPS_GOT_PAGE: case R_MIPS_GOT16: