PowerPC64 DT_RELR

Alan Modra amodra@gmail.com
Thu Jun 9 22:57:24 GMT 2022


On Thu, Jun 09, 2022 at 12:57:32PM +0200, Florian Weimer wrote:
> * Alan Modra via Binutils:
> 
> > PowerPC64 takes a more traditional approach to DT_RELR than x86.  Count
> > relative relocs in check_relocs, allocate space for them and output in
> > the usual places but not doing so when enable_dt_relr.  DT_RELR is
> > sized in the existing ppc stub relaxation machinery, run via the
> > linker's ldemul_after_allocation hook.  DT_RELR is output in the same
> > function that writes ppc stubs, run via ldemul_finish.
> >
> > This support should be considered experimental.
> 
> Upstream glibc enables DT_RELR for its ELF files by default (including
> tests), and we seem to hit something DT_RELR-related:
> 
>   Some glibc tests crash in DT_RELR relocation on powerpc64le
>   <https://sourceware.org/bugzilla/show_bug.cgi?id=29235>
> 
> (I'm working on attaching the test binary to the bug.)

I'll investigate.  My guess would be .eh_frame editing is the trigger.

> Maybe we should not automatically DT_RELR for glibc itself if BFD ld
> supports it?

Yes, at least until I can fix this.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list