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

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)