Skip to content

Commit 48e89b2

Browse files
committed
cmake/elf: Fix ELF entry point from __start to _start
__start is the kernel boot entry for each chip, while _start (defined in crt0.c) is the correct C runtime entry point for ELF executables.
1 parent cf53ee1 commit 48e89b2

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

arch/arm/src/cmake/elf.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ if(CONFIG_DEBUG_OPT_UNUSED_SECTIONS)
4646
endif()
4747
endif()
4848

49-
nuttx_elf_link_options(-e __start)
49+
nuttx_elf_link_options(-e _start)

arch/arm64/src/cmake/elf.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ nuttx_elf_link_options_ifdef(CONFIG_BUILD_KERNEL -Bstatic)
3232

3333
nuttx_elf_link_options_ifdef(CONFIG_DEBUG_OPT_UNUSED_SECTIONS --gc-sections)
3434

35-
nuttx_elf_link_options(-e __start)
35+
nuttx_elf_link_options(-e _start)

arch/x86_64/src/cmake/elf.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ nuttx_mod_link_options(-r)
3030

3131
nuttx_elf_link_options_ifdef(CONFIG_DEBUG_OPT_UNUSED_SECTIONS --gc-sections)
3232

33-
nuttx_elf_link_options(-e __start)
33+
nuttx_elf_link_options(-e _start)

0 commit comments

Comments
 (0)