opnsense-src/lib/csu
Andrew Turner eb1dae1c40 csu: Teach csu about PAC and BTI
Add the Branch Target Identification (BTI) note to libc assembly
sources and Pointer Authentication Code (PAC) instructions to _init and
_fini.

_init and _fini may be called indirectly so need a BTI landing pad. As
they are non-leaf functions use the appropriate PAC instruction that
also guards against changing the link register.

As all object files need the note for any binary using these object files
we need to insert it in all asm files.

Reviewed by:	markj
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42227

(cherry picked from commit 522126fea72419fae344fbcb897b41588909308a)
2024-02-19 13:12:08 +00:00
..
aarch64 csu: Teach csu about PAC and BTI 2024-02-19 13:12:08 +00:00
amd64 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
arm Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
common csu: Teach csu about PAC and BTI 2024-02-19 13:12:08 +00:00
i386 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
powerpc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
powerpc64 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
riscv Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
tests Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc csu: add crtbrand.o dependency on sys/param.h 2024-02-14 12:15:14 -05:00