Skip to content

Commit

Permalink
Skip unuse relocation when relaxation
Browse files Browse the repository at this point in the history
  • Loading branch information
ywgrit committed Aug 3, 2024
1 parent 13daa6f commit 6d525b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions elf/arch-loongarch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
// rewrite the ld.d insn with addi.d insn
*(ul32 *)(loc + 4) = 0x02c00000 | rd | (rd << 5);
write_k12(loc + 4, S + rels[i + 2].r_addend);
i += 3;
break;
}
}
Expand Down

0 comments on commit 6d525b7

Please sign in to comment.