From c896b1e9110bcf47379a2bd3db385bb51d340069 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Thu, 12 Jan 2023 07:28:36 -0800 Subject: [PATCH] userspace: Do not use --relax flag In platforms where the linker is capable of doing global optimizations, like relaxing address mode and synthesize new instructions, Zephyr has to disable it when enabling USERSPACE since the build expects that address don't change after the first stage build. Signed-off-by: Flavio Ceolin --- arch/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/Kconfig b/arch/Kconfig index 08707faeb1a..36e7ae844c8 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -274,6 +274,7 @@ config USERSPACE depends on RUNTIME_ERROR_CHECKS depends on SRAM_REGION_PERMISSIONS select THREAD_STACK_INFO + select LINKER_USE_NO_RELAX help When enabled, threads may be created or dropped down to user mode, which has significantly restricted permissions and must interact