Generate BTI GNU note for TS assembly files
Add GNU note after compiling assembly files to
avoid having warning.
Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
Change-Id: I9c293826ec0d0a3ad7df5d19eab80e1d0d8069ae
diff --git a/components/common/utils/include/asm.S b/components/common/utils/include/asm.S
index d3cecc3..9ed065f 100644
--- a/components/common/utils/include/asm.S
+++ b/components/common/utils/include/asm.S
@@ -1,8 +1,17 @@
/* SPDX-License-Identifier: BSD-2-Clause */
/*
+ * Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2014, STMicroelectronics International N.V.
*/
+#if defined(BTI_ENABLED)
+#include <arm64_bti.S>
+
+#define BTI(...) __VA_ARGS__
+#else
+#define BTI(...)
+#endif
+
.macro FUNC name colon section=default
.ifc \section\(),default
.section .text.\name
@@ -13,6 +22,7 @@
.type \name , %function
.balign 4
\name \colon
+ BTI(bti c)
.endm
.macro DATA name colon
@@ -30,6 +40,7 @@
.type \name , %function
.balign 4
\name \colon
+ BTI(bti c)
.endm
.macro LOCAL_DATA name colon