HomeFreeBSD

arm64: Support creating a BTI & PAC note

Description

arm64: Support creating a BTI & PAC note

To detect when an object file is build with the Branch Target
Identification (BTI) and Pointer Authentication Code (PAC) extensions
there is an elf note the compiler will insert. It will only do so from
a high level language, e.g. C or C++.

To get the not in assembly add the GNU_PROPERTY_AARCH64_FEATURE_1_NOTE
macro that can be used to create it, and the
GNU_PROPERTY_AARCH64_FEATURE_1_VAL macro to insert the correct value
based on which combination of BTI and PAC are enabled.

Reviewed by: markj (earlier version), emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D42225

(cherry picked from commit 82597d2102a02c4e9e9355717c32867d34b77ef0)

Details

Provenance
andrewAuthored on Oct 10 2023, 1:00 PM
Reviewer
markj
Differential Revision
D42225: arm64: Support creating a BTI & PAC note
Parents
rG55e2bfab4485: tools/build: Support building with glibc 2.38
Branches
Unknown
Tags
Unknown