git: d4163257401c - stable/14 - rtld: Teach rtld about the BTI elf note

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 19 Feb 2024 16:45:15 UTC
The branch stable/14 has been updated by andrew:

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

commit d4163257401ce2fbf1023453992fbf15111beb48
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-10-12 16:29:46 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2024-02-19 13:12:18 +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
    
    (cherry picked from commit 5270cc9757fb4e0c1303ec44c2602b75acf3806d)
---
 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)