[PATCH v2 1/2] arm64: asmlinkage: Enable use of BTI_C macro in SYM_CODE

Mark Brown broonie at kernel.org
Tue May 18 11:25:48 PDT 2021


SYM_CODE sections may require BTI landing pads but won't have them
automatically generated by the symbol definiton macros. Make an empty
version of the BTI_C macro available when BTI is disabled so that they
can more easily create the landing pads if they need them.

Signed-off-by: Mark Brown <broonie at kernel.org>
---
 arch/arm64/include/asm/linkage.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h
index ba89a9af820a..d98f9af8b8ec 100644
--- a/arch/arm64/include/asm/linkage.h
+++ b/arch/arm64/include/asm/linkage.h
@@ -42,6 +42,10 @@
 	SYM_START(name, SYM_L_WEAK, SYM_A_NONE)		\
 	BTI_C
 
+#else
+
+#define BTI_C
+
 #endif
 
 /*
-- 
2.20.1




More information about the linux-arm-kernel mailing list