PowerPC64 DT_RELR

Florian Weimer fweimer@redhat.com
Thu Jun 9 10:57:32 GMT 2022


* 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.)

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

Thanks,
Florian



More information about the Binutils mailing list