https://gcc.gnu.org/g:13a536601807b6e24ea203649b6a9d79d0f8ac92
commit r16-7721-g13a536601807b6e24ea203649b6a9d79d0f8ac92 Author: Matthieu Longo <[email protected]> Date: Fri Jan 30 15:53:18 2026 +0000 aarch64: remove GNU properties expectations from a BTI test When branch protections are enabled (see -mbranch-protection), GCC tags the output object file with metadata describing which security features are used, allowing the GNU linker to detect incompatibilities between objects in the same link unit. Originally, this metadata was conveyed via GNU properties. GCC emitted a .note.gnu.property section containing a GNU_PROPERTY_AARCH64_FEATURE_1_AND entry. Build Attributes v2 (OAv2) aim at replacing GNU properties, provinding a more flexible way to express complex metadata and making easier for tools like linkers to parse them. Since the runtime linker only understands GNU properties, the GNU static linker translates OAv2 attributes into GNU properties. As a result, emitting both GNU properties and OAv2 in the same object file is redundant. When GCC detects OAv2 support in GNU binutils, it therefore emits only OAv2 directives. Support for OAv2 was added in [1], along with new tests covering both the emission/omission of GNU properties/OAv2 directives. However, an older BTI test that checked for the presence of a GNU properties section was left unchanged. This test now fails when GNU binutils support OAv2, as no GNU properties are emitted. This patch removes the expectations of the presence of GNU properties from that BTI test. [1]: 98f5547dce2503d9d0f0cd454184d6870a315538 gcc/testsuite/ChangeLog: * gcc.target/aarch64/bti-1.c: Update. Diff: --- gcc/testsuite/gcc.target/aarch64/bti-1.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/aarch64/bti-1.c b/gcc/testsuite/gcc.target/aarch64/bti-1.c index 53dc2d3cd8b2..174b62eb05b1 100644 --- a/gcc/testsuite/gcc.target/aarch64/bti-1.c +++ b/gcc/testsuite/gcc.target/aarch64/bti-1.c @@ -61,5 +61,3 @@ lab2: } /* { dg-final { scan-assembler-times "hint\t34 // bti c" 1 } } */ /* { dg-final { scan-assembler-times "hint\t36 // bti j" 12 } } */ -/* { dg-final { scan-assembler "\.section\t\.note\.gnu\.property" { target *-*-linux* } } } */ -/* { dg-final { scan-assembler "\.word\t0x7\t\/\/ GNU_PROPERTY_AARCH64_FEATURE_1_AND \\(BTI, PAC, GCS\\)" { target *-*-linux* } } } */ \ No newline at end of file
