HomeFreeBSD

csu: Teach csu about PAC and BTI

Description

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

Details

Provenance
andrewAuthored on Oct 12 2023, 10:03 AM
Reviewer
markj
Differential Revision
D42227: csu: Teach libc about PAC and BTI
Parents
rG95335dd3c19e: rtld: introduce STATIC_TLS_EXTRA
Branches
Unknown
Tags
Unknown