[PATCH] aarch64: Fix static PIE CPU feature detection (BZ 34205)
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Mon Jun 15 12:48:16 GMT 2026
Hi Adhemerval,
> I tried to improve the later with b75ad99d45b7475eca46353e68f4009f3837c751,
> but moving ARCH_INIT_CPU_FEATURES *after* _dl_relocate_static_pie has a higher
> risk of regressions.
>
> I added on my backlog to check if we can improve it by moving
> ARCH_INIT_CPU_FEATURES after static-pie relocation. It would require to
> check on all ABIs.
Right, I guess it would need splitting off ifunc resolvers from the relocations since
CPU_FEATURES is needed by ifunc resolution on many targets.
>> Given all the recent fixes to various dl-symbol-redir-ifunc.h, would it not
>> be best to add all ifuncs to it?
>
> I would say so, but I added only memcmp for this fix to make it simpler for
> backport (if required).
With memcmp that is the full set on AArch64 atm.
>> The changes look fine - though I don't believe get_midr_from_mcpu is very useful...
>
> Maybe not indeed, I can check and see if we can remove it.
Looking at it, it allows switching off CPU-specific ifuncs by forcing to a generic core.
In general being able to force the generic ifunc would be far better, plus maybe
the ability to disable certain architecture features.
So the patch is OK as is.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cheers,
Wilco
More information about the Libc-alpha
mailing list