conf: Enable BTI checking in the arm64 kernel

To ensure new code has BTI support make it an error to not have the
BTI ELF note when linking the kernel and kernel modules.

Reviewed by:	kib, emaste
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45469
This commit is contained in:
Andrew Turner
2024-08-19 13:59:49 +01:00
parent 12a6257a96
commit 43e8849bc2
+3
View File
@@ -143,6 +143,9 @@ CFLAGS += -mgeneral-regs-only
CFLAGS += -ffixed-x18 CFLAGS += -ffixed-x18
# Build with BTI+PAC # Build with BTI+PAC
CFLAGS += -mbranch-protection=standard CFLAGS += -mbranch-protection=standard
.if ${LINKER_TYPE} == "lld"
LDFLAGS += -Wl,-zbti-report=error
.endif
# TODO: support outline atomics # TODO: support outline atomics
CFLAGS += -mno-outline-atomics CFLAGS += -mno-outline-atomics
INLINE_LIMIT?= 8000 INLINE_LIMIT?= 8000