cmake kernel build(bugfix): remove unused section in elf link

this will reduce the size of elf

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
xuxin19
2025-05-13 20:08:57 +08:00
committed by GUIDINGLI
parent d676716e7a
commit 63dc48e713
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -33,3 +33,5 @@ nuttx_elf_link_options_ifdef(
nuttx_elf_link_options_ifdef(CONFIG_BINFMT_ELF_RELOCATABLE -r)
nuttx_elf_link_options_ifdef(CONFIG_BUILD_KERNEL -Bstatic)
nuttx_elf_link_options_ifdef(CONFIG_DEBUG_OPT_UNUSED_SECTIONS --gc-sections)
+2
View File
@@ -25,3 +25,5 @@ nuttx_elf_compile_options(-fvisibility=hidden)
nuttx_elf_link_options_ifdef(CONFIG_BINFMT_ELF_RELOCATABLE -r)
nuttx_elf_link_options_ifdef(CONFIG_BUILD_KERNEL -Bstatic)
nuttx_elf_link_options_ifdef(CONFIG_DEBUG_OPT_UNUSED_SECTIONS --gc-sections)