1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-04 16:48:04 +03:00

[ELF] Report errors more strictly for unrepresentable relocations

This commit is contained in:
Rui Ueyama 2022-03-05 14:59:11 +09:00
parent 83aaa63a49
commit d6dae3be6d
2 changed files with 4 additions and 4 deletions

View File

@ -433,8 +433,8 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
case R_AARCH64_ADR_PREL_PG_HI21: {
Action table[][4] = {
// Absolute Local Imported data Imported code
{ NONE, NONE, ERROR, ERROR }, // DSO
{ NONE, NONE, COPYREL, PLT }, // PIE
{ ERROR, NONE, ERROR, ERROR }, // DSO
{ ERROR, NONE, COPYREL, PLT }, // PIE
{ NONE, NONE, COPYREL, PLT }, // PDE
};
dispatch(ctx, table, i, rel, sym);

View File

@ -554,8 +554,8 @@ void InputSection<E>::scan_relocations(Context<E> &ctx) {
case R_RISCV_HI20: {
Action table[][4] = {
// Absolute Local Imported data Imported code
{ NONE, NONE, ERROR, ERROR }, // DSO
{ NONE, NONE, COPYREL, PLT }, // PIE
{ NONE, ERROR, ERROR, ERROR }, // DSO
{ NONE, ERROR, ERROR, ERROR }, // PIE
{ NONE, NONE, COPYREL, PLT }, // PDE
};
dispatch(ctx, table, i, rel, sym);