[PATCH] binutils: partially revert 17c6c3b99156fe82c1e637e1a5fd9f163ac788c8
徐持恒 Xu Chiheng
chiheng.xu@gmail.com
Mon Nov 21 10:59:08 GMT 2022
On Mon, Nov 21, 2022 at 5:52 PM Jan Beulich <jbeulich@suse.com> wrote:
> >
> > It is clear now that x86-64 linker treats the REL relocation entries
> > as RELA relocation entries, when doing relocation, it does not count
> > the addend in section content, because src_mask is set to 0.
> >
> > Then can objcopy transform the REL relocation entries to RELA
> > relocation entries, so the x86-64 linker can consume them correctly ?
>
> It probably could, but I have no idea how to invasive this would end
> up being.
>
A much simpler solution is to let the linker accept the slightly
non-ABI-conformant ELF64(with both REL and RELA relocation entries).
The use of src_mask is dependent on whether relocation entry is REL or RELA.
More information about the Binutils
mailing list