From f57483664b530e64868b8d9f4bd44b3b14fa236c Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Sun, 23 May 2021 17:23:41 +0200 Subject: [PATCH] arch: arm: swap_helper.S: safe guarding GTEXT(z_arm_do_syscall) z_arm_do_syscall is only defined and used when CONFIG_USERSPACE=y. Defining the symbol z_arm_do_syscall in assembly without a corresponding implementation is fine for GNU ld as long as the function is not actively called, but armlink fails to link in such cases. Safegaurd GTEXT(z_arm_do_syscall) so the symbol is only referenced when actively used, that is when CONFIG_USERSPACE=y. Signed-off-by: Torsten Rasmussen --- arch/arm/core/aarch32/swap_helper.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/core/aarch32/swap_helper.S b/arch/arm/core/aarch32/swap_helper.S index b4e7f4cb533..67bf266c6fc 100644 --- a/arch/arm/core/aarch32/swap_helper.S +++ b/arch/arm/core/aarch32/swap_helper.S @@ -28,7 +28,9 @@ _ASM_FILE_PROLOGUE GTEXT(z_arm_svc) GTEXT(z_arm_pendsv) GTEXT(z_do_kernel_oops) +#if defined(CONFIG_USERSPACE) GTEXT(z_arm_do_syscall) +#endif GDATA(_kernel)