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
This commit is contained in:
Andrew Turner 2023-10-12 17:29:46 +01:00
parent 522126fea7
commit 5270cc9757

View file

@ -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)