[PATCH v3 23/29] configure: Add --with-ld-relro-load-gaps configure option and test

Florian Weimer fw@deneb.enyo.de
Thu Dec 26 13:16:04 GMT 2024


* Adhemerval Zanella Netto:

> On 29/11/24 13:17, Florian Weimer wrote:
>> * Adhemerval Zanella Netto:
>> 
>>> On 29/09/24 13:36, Florian Weimer wrote:
>>>> Related to binutils bug 28743.
>>>>
>>>> The new test elf/tst-gaps-ldso verifies that ld.so does not have gaps
>>>> if the configure check indicates that the linker does not produce such
>>>> gaps, and the architecture supports a single page size only.
>>>>
>>>> The companion test elf/tst-load-alignment checks that the LOAD
>>>> segments produced during the build permit loading glibc on the
>>>> largest supported page size.
>>>
>>> I failing to see the usefulness of this new configure check, if I understand
>>> correctly on following patches it uses as an optimization on rtld.c and
>>> dl-find_object.c to avoid some extra work for l_contiguous. It also seems
>>> that it used solely on cold-path (initialization).
>>>
>>> Do we really need this configure switch?
>> 
>> The test is required to disable the gap test if binutils is known to be
>> buggy and produces gaps even on targets where just one page size is
>> supported.  This bug is fixed in later binutils.  We still do not have a
>> way to produce gapless binaries that support multiple page sizes.
>
> Can't we just add this test as default and mark the tests as XFAIL in
> case of on a faulty binutils?

Do you mean XFAILing it unconditionally, without checking the binutils
version?  Or maybe XFAIL it only for --without-ld-relro-load-gaps,
and default to that?


More information about the Libc-alpha mailing list