git: 5270cc9757fb - main - rtld: Teach rtld about the BTI elf note

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 30 Oct 2023 17:56:18 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=5270cc9757fb4e0c1303ec44c2602b75acf3806d

commit 5270cc9757fb4e0c1303ec44c2602b75acf3806d
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-10-12 16:29:46 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2023-10-30 17:55:44 +0000

    rtld: Teach rtld about the BTI elf note
    
    Add the Branch Target Identification (BTI) note to libc assembly
    sources. As all obect files need the note for rtld to have it we need
    to insert it in all asm files.
    
    Reviewed by:    markj, emaste
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D42228
---
 libexec/rtld-elf/aarch64/rtld_start.S | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libexec/rtld-elf/aarch64/rtld_start.S b/libexec/rtld-elf/aarch64/rtld_start.S
index 7dc87213b5fb..8de3e021d567 100644
--- a/libexec/rtld-elf/aarch64/rtld_start.S
+++ b/libexec/rtld-elf/aarch64/rtld_start.S
@@ -28,6 +28,8 @@
  */
 
 #include <machine/asm.h>
+#include <sys/elf_common.h>
+
 ENTRY(.rtld_start)
 	.cfi_undefined	x30
 	mov	x19, x0		/* Put ps_strings in a callee-saved register */
@@ -249,3 +251,5 @@ ENTRY(_rtld_tlsdesc_dynamic)
 	.cfi_adjust_cfa_offset	-2 * 16
 	ret
 END(_rtld_tlsdesc_dynamic)
+
+GNU_PROPERTY_AARCH64_FEATURE_1_NOTE(GNU_PROPERTY_AARCH64_FEATURE_1_VAL)