[PATCH v11 20/25] aarch64: merge of Object Attributes v2 during linkage

Jan Beulich jbeulich@suse.com
Thu Jan 8 14:19:54 GMT 2026


On 31.12.2025 00:05, Matthieu Longo wrote:
> This patch adds support to AArch64 backend to process AEABI Build
> Attributes and raise any compatibility issue.
> 
> AArch64 backend declares 2 vendor subsections, and their associated tags:
> - aeabi_feature_and_bits: contains tags that describe the same optional
>   bits as the GNU_PROPERTY_AARCH64_FEATURE_1_AND. For now, the following
>   attributes are recognized:
>     - Tag_Feature_BTI: means that all the executable sections are
>       compatible with Branch Target Identification (BTI) mechanism.
>     - Tag_Feature_PAC: means that all the executable sections have been
>       protected with Return Address Signing.
>     - Tag_Feature_GCS: means that all the executable sections are
>       compatible with the Guarded Control Stack (GCS) extension.
> - aeabi_pauthabi: contains information about the Pointer Authentication
>   Signing schema when the object uses an extension to ELF, PAUTHABI64,
>   which is currently not supported by GCC toolchain. The pointers that
>   are signed as well as the modifiers and key used for each type of
>   pointer are known as the signing schema. The support of this
>   subsection is there for completeness with the AEABI Build Attributes
>   document, and allows readelf to dump the data nicely, and the linker
>   to detect a use of a signing schema, and error.
>     - Tag_PAuth_Paltform: the platform vendor id.
>     - Tag_PAuth_Schema: the version numner of the schema.
> 
> For backward-compatibilty purpose, AArch64 backend translates
> GNU_PROPERTY_AARCH64_FEATURE_1_AND in input files to its OAv2 equivalents.
> The frozen set of OAv2 is populated with values derived from command-line
> options for BTI (-z force-bti) and GCS (-z gcs=*).
> It also reports incompatibilities for BTI and GCS, and set BTI PLT type
> depending on the OAv2 merge result.
> Regarding incompatibilities, only the ones detected in objects constituting
> the output link unit will be reported. Supports for detecting incompatibilities
> in shared objects might be a future work to bring it in pair with the GNU
> properties merge. However, since OAv2 are translated to GNU properties,
> detection will still happen so this feature seems redundant and of little
> value given the backward compatibility support for GNU properties is
> required (see next paragraph).
> Finally, it translates OAv2s in subsection "aeabi_feature_and_bits" to
> GNU_PROPERTY_AARCH64_FEATURE_1_AND as GNU properties are required for
> the dynamic linker (it does not understand OAv2s yet).
> ---
>  bfd/elf-attrs.c     |  14 +-
>  bfd/elf-attrs.h     |  11 ++

Okay as far as these go.

>  bfd/elfnn-aarch64.c |  84 ++++++++++-
>  bfd/elfxx-aarch64.c | 356 ++++++++++++++++++++++++++++++++++++++++++--
>  bfd/elfxx-aarch64.h |  31 ++++
>  5 files changed, 471 insertions(+), 25 deletions(-)

For the rest, I fear I haven't tracked whether you got an Arm64 okay already.

Jan


More information about the Binutils mailing list