[PATCH] arm: Prevent GCC from using VFP registers in code used during dynamic linking
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Mon May 11 18:26:00 GMT 2026
On 11/05/26 13:51, Aurelien Jarno wrote:
> On 2026-05-11 10:54, Adhemerval Zanella Netto wrote:
>>
>>
>> On 10/05/26 19:00, Aurelien Jarno wrote:
>>> Starting with GCC 15, VFP registers are used more aggressively on ARM,
>>> including in ld.so code involved in runtime linking. For instance d7 is
>>> used in _dl_lookup_symbol_, which clobbers the 8th floating point
>>> argument of a function on its first call.
>>
>> We added the --with-rtld-early-cflags configure option for avoid such issue,
>> couldn't this be used instead of specific flags to specific objects?
>
> This is a configure option, so do you mean changing the default value
> for arm?
I think it should a decision on which ISA do you want to deploy glibc.
If you targetting armv7a system, runtime should be free to use any register
on dynamic loader.
>
> Anyway is doesn't work as it misses dl-lookup.os and dl-runtime.os, but
> works for dl-misc.os.
>
I think it would be better to add $(rtld-early-cflags) for such objects
as well.
What I want to avoid is having multiple configurations on how to build
startup code. We already have the stack-protector, stack usage, ifunc
redirections to be aware.
More information about the Libc-alpha
mailing list