Skip to content

Commit

Permalink
[LoongArch] Remove relocation overflow checks
Browse files Browse the repository at this point in the history
These relocations may overflow with -mcmodel=extreme.
  • Loading branch information
rui314 committed Oct 19, 2023
1 parent a9ab0ff commit 4bd80ec
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions elf/arch-loongarch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
write_k12(loc, GOT + G + A);
break;
case R_LARCH_GOT_PC_HI20:
check(GOT + G + A - P, -(1LL << 31), 1LL << 31);
write_j20(loc, hi20(GOT + G + A, P));
break;
case R_LARCH_GOT64_PC_LO20:
Expand Down Expand Up @@ -375,7 +374,6 @@ void InputSection<E>::apply_reloc_alloc(Context<E> &ctx, u8 *base) {
write_k12(loc, sym.get_gottp_addr(ctx) + A);
break;
case R_LARCH_TLS_IE_PC_HI20:
check(sym.get_gottp_addr(ctx) + A - P, -(1LL << 31), 1LL << 31);
write_j20(loc, hi20(sym.get_gottp_addr(ctx) + A, P));
break;
case R_LARCH_TLS_IE64_PC_LO20:
Expand Down

0 comments on commit 4bd80ec

Please sign in to comment.