Skip to content

Commit bf5527b

Browse files
committed
arch/crt0.c: revert entry to _start
This reverts name changes in pull/12201 to fix LTO issue/17443, needs apps/ side patch. Signed-off-by: Yanfeng Liu <[email protected]>
1 parent a51e45d commit bf5527b

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

arch/arm/src/common/crt0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static void exec_dtors(void)
141141
****************************************************************************/
142142

143143
/****************************************************************************
144-
* Name: __start
144+
* Name: _start
145145
*
146146
* Description:
147147
* This function is the low level entry point into the main thread of
@@ -160,7 +160,7 @@ static void exec_dtors(void)
160160
*
161161
****************************************************************************/
162162

163-
void __start(int argc, char *argv[])
163+
void _start(int argc, char *argv[])
164164
{
165165
int ret;
166166

arch/arm64/src/common/crt0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static void exec_dtors(void)
148148
****************************************************************************/
149149

150150
/****************************************************************************
151-
* Name: __start
151+
* Name: _start
152152
*
153153
* Description:
154154
* This function is the low level entry point into the main thread of
@@ -167,7 +167,7 @@ static void exec_dtors(void)
167167
*
168168
****************************************************************************/
169169

170-
void __start(int argc, char *argv[])
170+
void _start(int argc, char *argv[])
171171
{
172172
int ret;
173173

arch/risc-v/src/common/crt0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static void exec_dtors(void)
145145
****************************************************************************/
146146

147147
/****************************************************************************
148-
* Name: __start
148+
* Name: _start
149149
*
150150
* Description:
151151
* This function is the low level entry point into the main thread of
@@ -164,7 +164,7 @@ static void exec_dtors(void)
164164
*
165165
****************************************************************************/
166166

167-
void __start(int argc, char *argv[])
167+
void _start(int argc, char *argv[])
168168
{
169169
int ret;
170170

arch/x86_64/src/common/crt0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static void exec_dtors(void)
130130
****************************************************************************/
131131

132132
/****************************************************************************
133-
* Name: __start
133+
* Name: _start
134134
*
135135
* Description:
136136
* This function is the low level entry point into the main thread of
@@ -149,7 +149,7 @@ static void exec_dtors(void)
149149
*
150150
****************************************************************************/
151151

152-
void __start(int argc, char *argv[])
152+
void _start(int argc, char *argv[])
153153
{
154154
int ret;
155155

arch/xtensa/src/common/crt0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static void exec_dtors(void)
9696
****************************************************************************/
9797

9898
/****************************************************************************
99-
* Name: __start
99+
* Name: _start
100100
*
101101
* Description:
102102
* This function is the low level entry point into the main thread of
@@ -115,7 +115,7 @@ static void exec_dtors(void)
115115
*
116116
****************************************************************************/
117117

118-
void __start(int argc, char *argv[])
118+
void _start(int argc, char *argv[])
119119
{
120120
int ret;
121121

tools/toolchain.cmake.export

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
2222
add_compile_options(-nostdlib)
2323
add_compile_options(-ffunction-sections -fdata-sections)
2424

25-
# same entry used for all build modes in crt0.c and arch/.../xxx_start.c
26-
set(ENTRY_NAME "__start")
25+
# same entry used for all build modes in crt0.c
26+
27+
set(ENTRY_NAME "_start")
2728

2829
set(CMAKE_C_LINK_EXECUTABLE
2930
"<CMAKE_LINKER> ${LDFLAGS} --entry=${ENTRY_NAME} -T${LINKER_SCRIPT} <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -L${NUTTX_PATH}/libs --start-group ${LDLIBS} ${EXTRA_LIBS} --end-group"

0 commit comments

Comments
 (0)