diff --git a/elf/arch-i386.cc b/elf/arch-i386.cc index fd17756b..b7527059 100644 --- a/elf/arch-i386.cc +++ b/elf/arch-i386.cc @@ -426,7 +426,7 @@ void InputSection::scan_relocations(Context &ctx) { case R_386_PC32: { Action table[][4] = { // Absolute Local Imported data Imported code - { BASEREL, NONE, ERROR, ERROR }, // DSO + { BASEREL, NONE, DYNREL, DYNREL }, // DSO { BASEREL, NONE, COPYREL, PLT }, // PIE { NONE, NONE, COPYREL, PLT }, // PDE }; diff --git a/elf/arch-x86-64.cc b/elf/arch-x86-64.cc index 0119180f..b4b32efd 100644 --- a/elf/arch-x86-64.cc +++ b/elf/arch-x86-64.cc @@ -82,8 +82,7 @@ static void write_ibtplt(Context &ctx) { } } -// The regular PLT. Unless `-z ibtplt` is given (which is rare), this -// version will be used. +// The regular PLT. static void write_plt(Context &ctx) { u8 *buf = ctx.buf + ctx.plt->shdr.sh_offset; @@ -654,7 +653,7 @@ void InputSection::scan_relocations(Context &ctx) { case R_X86_64_PC64: { Action table[][4] = { // Absolute Local Imported data Imported code - { BASEREL, NONE, ERROR, ERROR }, // DSO + { BASEREL, NONE, DYNREL, DYNREL }, // DSO { BASEREL, NONE, COPYREL, PLT }, // PIE { NONE, NONE, COPYREL, PLT }, // PDE };