[PATCH v2] elf: Support DT_RELR relative relocation format [BZ #27924]

H.J. Lu hjl.tools@gmail.com
Fri Oct 29 18:36:53 GMT 2021


On Fri, Oct 29, 2021 at 11:22 AM Carlos O'Donell via Binutils
<binutils@sourceware.org> wrote:
>
> On 10/16/21 20:50, Fangrui Song via Binutils wrote:
> > PIE and shared objects usually have many relative relocations. In
> > 2017/2018, SHT_RELR/DT_RELR was proposed on
> > https://groups.google.com/g/generic-abi/c/bX460iggiKg/m/GxjM0L-PBAAJ
> > ("Proposal for a new section type SHT_RELR") and is a pre-standard. RELR
> > usually takes 3% or smaller space than R_*_RELATIVE relocations. The
> > virtual memory size of a mostly statically linked PIE is typically 5~10%
> > smaller.
>
> We've been going over this patch on the weekly Monday patch queue review.
>
> I took a note to point out that one of the blockers here is that it is difficult
> to immediately test this work because it requires a working glibc build using
> ldd (which has support for DT_RELR).
>
> What is the status of the lld support patches for glibc?
>
> If we made progress on the lld support then we'd be able to more easily review
> a testable configuration and keep the review going forward.
>

I raised the mysterious crash issue:

https://groups.google.com/g/generic-abi/c/bX460iggiKg

We need an updated proposal without mysterious crashes.  One option is
that the linker should bump EI_ABIVERSION when generating DT_RELR.
After this issue is resolved, I can look into the bfd linker support.

-- 
H.J.


More information about the Binutils mailing list