HomeFreeBSD

arm64: Add a BTI landing pad to .mcount

Description

arm64: Add a BTI landing pad to .mcount

The .mcount function needs a BTI branch target. As we can't rely on
asm.h being included use the hint version of a "bti c" instruction.
This is a nop when BTI is not supported or not used.

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

(cherry picked from commit 0590ed0967e025e1d155da9e06509f3fe9686feb)

Details

Provenance
andrewAuthored on Oct 16 2023, 2:34 PM
Reviewer
markj
Differential Revision
D42230: arm64: Add a BTI landing pad to .mcount
Parents
rG72b242ac15af: arm64: Use the Linux sigframe to restore registers
Branches
Unknown
Tags
Unknown