[PATCH v3 0/1] aarch64: Use build attributes for feature marking
Muhammad Kamran
muhammad.kamran@arm.com
Thu May 28 09:29:32 GMT 2026
This is v3 of the patch.
This version updates the AArch64 assembly feature marking logic to emit
AArch64 feature-and-bits build attributes when the toolchain supports build
attributes via __ARM_BUILDATTR64_FV.
For such toolchains, assembly objects now use .aeabi_attribute entries
for BTI, PAC, and GCS. For older toolchains, the existing
NT_GNU_PROPERTY_TYPE_0 note emission is kept as the fallback.
Compared with the previous version, I kept the existing GNU_PROPERTY
macro layout and indentation unchanged, so the diff is focused on the new
build-attribute support. The same selection logic is mirrored in
elf/tst-asm-helper.h, since some assembly tests and custom test DSOs
cannot include sysdep.h.
v2 can be found here:
https://inbox.sourceware.org/libc-alpha/20260518104714.19292-1-muhammad.kamran@arm.com/T/#t
v1 can be found here:
https://inbox.sourceware.org/libc-alpha/20260518094339.10846-1-muhammad.kamran@arm.com/T/#u
Changes since v2:
* Address feedback from Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>.
Reverted indentation change for macro GNU_PROPERTY.
Changes since v1:
* Emit feature bti/gcs/pac 0 if the individual feature is disabled
rather than not emitting it in build attributes.
Muhammad Kamran (1):
aarch64: Use build attributes for asm feature marking
elf/tst-asm-helper.h | 37 ++++++++++++++++++++++++++++++-------
sysdeps/aarch64/sysdep.h | 32 ++++++++++++++++++++++++++++----
2 files changed, 58 insertions(+), 11 deletions(-)
--
2.43.0
More information about the Libc-alpha
mailing list