[PATCH v2] AArch64: Cleanup PAC and BTI
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Fri May 16 13:33:33 GMT 2025
Hi Matthieu,
> I am not opposing this change but please, could you explain why we are
> doing this ?
> Is it because the minimum requirements to build glibc were increased to
> a newer version of binutils ?
Correct - I'll make this clearer in v3.
> Sorry to ask you to go beyond the original scope of this patch. Please
> could you fix this and use the AArch64 CFI directive instead of the
> SPARC one ? Feel free to do it in a separate patch.
Sure, that is easy to add.
> I noticed that the CFI instructions are not starting with a dot.
> I didn't know that it was supported. Any reason for preferring this ?
All cfi directives are #defines so they can be compiled out or adapted to
support different unwind directives.
> @@ -75,11 +75,7 @@ call_weak_fn:
> .hidden _init
> .type _init, %function
> _init:
> -#if HAVE_AARCH64_PAC_RET
> - PACIASP
> -#else
> - BTI_C
> -#endif
> + paciasp
> Any reason for not adding the CFI along the signing ?
These are code fragments that combined by the linker to create the init and fini functions,
so there is no easy way to use unwind directives in a way that works.
Cheers,
Wilco
More information about the Libc-alpha
mailing list