arm/build: suppress LOAD RWX linker warning

Add --no-warn-rwx-segments in case of RAM boot mode to linker to
suppress the below warning:
"nuttx has a LOAD segment with RWX permissions"

Signed-off-by: Jinliang Li <lijinliang1@lixiang.com>
This commit is contained in:
Jinliang Li 2024-10-23 09:02:30 +08:00 committed by archer
parent 3225aa853f
commit 52995452e5
2 changed files with 3 additions and 1 deletions

View File

@ -66,7 +66,7 @@ if(CONFIG_ARCH_TOOLCHAIN_GNU)
if(GCCVER GREATER_EQUAL 12)
add_compile_options(--param=min-pagesize=0)
if(CONFIG_ARCH_RAMFUNCS)
if(CONFIG_ARCH_RAMFUNCS OR NOT CONFIG_BOOT_RUNFROMFLASH)
add_link_options(-Wl,--no-warn-rwx-segments)
endif()
endif()

View File

@ -317,6 +317,8 @@ else
ARCHOPTIMIZATION += --param=min-pagesize=0
ifeq ($(CONFIG_ARCH_RAMFUNCS),y)
LDFLAGS += --no-warn-rwx-segments
else ifeq ($(CONFIG_BOOT_RUNFROMFLASH),)
LDFLAGS += --no-warn-rwx-segments
endif
endif
endif