ld 2.36 regression linking EFI binary from ELF input with debug info
Jeremy Drake
sourceware-bugzilla@jdrake.com
Wed Feb 17 05:56:55 GMT 2021
On Tue, 16 Feb 2021, Jan Beulich wrote:
> On 04.02.2021 14:21, Jan Beulich via Binutils wrote:
> > the Xen project hypervisor build system includes building the
> > hypervisor binary as an EFI application, as an option (i.e.
> > as long as the tool chain supports this). Already when probing
> > the linker we now suddenly get several "relocation truncated
> > to fit:R_X86_64_32 against `.debug_...'" errors. I have not
> > had the time to figure out what exactly broke this, and I'm
> > sending this mail in the hope that it may ring a bell for
> > someone.
> >
>
> The problem is the larger default image base, introduced by
> 514b4e191d5f ("Change the default characteristics of DLLs built
> by the linker to more secure settings"). The default linker
> script already before this didn't work when specifying a large
> enough image base; now it doesn't even work with the default
> base address.
>
I don't think this issue is exclusive to EFI. I have seen one or two
reports of this on the msys2 project, the only one I can remember/track
down at the moment is
https://github.com/msys2/MINGW-packages/issues/7023#issuecomment-774672411
A similar unsolved issue happens with undefined weak symbols, reported as
https://sourceware.org/bugzilla/show_bug.cgi?id=26659
More information about the Binutils
mailing list