1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-11 13:06:59 +03:00
This commit is contained in:
Rui Ueyama 2023-06-19 12:35:20 +09:00
parent ebd780e8ba
commit d4d93d7fb7

View File

@ -361,7 +361,7 @@ static void apply_absrel(Context<E> &ctx, InputSection<E> &isec,
case DYNREL: case DYNREL:
apply_dynrel(); apply_dynrel();
break; break;
case IFUNC: { case IFUNC:
if constexpr (supports_ifunc<E>) { if constexpr (supports_ifunc<E>) {
u64 addr = sym.get_addr(ctx, NO_PLT) + A; u64 addr = sym.get_addr(ctx, NO_PLT) + A;
*dynrel++ = ElfRel<E>(P, E::R_IRELATIVE, 0, addr); *dynrel++ = ElfRel<E>(P, E::R_IRELATIVE, 0, addr);
@ -371,7 +371,6 @@ static void apply_absrel(Context<E> &ctx, InputSection<E> &isec,
unreachable(); unreachable();
} }
break; break;
}
default: default:
unreachable(); unreachable();
} }
@ -401,11 +400,10 @@ void InputSection<E>::write_to(Context<E> &ctx, u8 *buf) {
return; return;
// Copy data // Copy data
if constexpr (is_riscv<E>) { if constexpr (is_riscv<E>)
copy_contents_riscv(ctx, buf); copy_contents_riscv(ctx, buf);
} else { else
uncompress_to(ctx, buf); uncompress_to(ctx, buf);
}
// Apply relocations // Apply relocations
if (!ctx.arg.relocatable) { if (!ctx.arg.relocatable) {