Skip to content

Commit bcea169

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

File tree

11 files changed

+18
-17
lines changed

11 files changed

+18
-17
lines changed

arch/arm/src/common/Toolchain.defs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ ifneq ($(CONFIG_BUILD_KERNEL),y)
572572
LDELFFLAGS += $(TOPDIR)$(DELIM)arch$(DELIM)arm$(DELIM)src$(DELIM)crt0.o
573573
endif
574574

575-
LDELFFLAGS += -e __start -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)elf$(DELIM)gnu-elf.ld)
575+
LDELFFLAGS += -e _start -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)elf$(DELIM)gnu-elf.ld)
576576

577577
# Zig toolchain
578578

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/Toolchain.defs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld)
288288
CELFFLAGS = $(CFLAGS) -fvisibility=hidden # --target1-abs
289289
CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden # --target1-abs
290290

291-
LDELFFLAGS = -r -e __start
291+
LDELFFLAGS = -r -e _start
292292
ifneq ($(CONFIG_BUILD_KERNEL),y)
293293
# Flat build and protected elf entry point use crt0,
294294
# Kernel build will use apps/import/scripts/crt0

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/Toolchain.defs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld)
258258
CELFFLAGS = $(CFLAGS) -fvisibility=hidden
259259
CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden
260260

261-
LDELFFLAGS = -r -e __start
261+
LDELFFLAGS = -r -e _start
262262
ifneq ($(CONFIG_BUILD_KERNEL),y)
263263
# Flat build and protected elf entry point use crt0,
264264
# Kernel build will use apps/import/scripts/crt0

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

arch/xtensa/src/lx6/Toolchain.defs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld)
232232
CELFFLAGS = $(CFLAGS) -fvisibility=hidden -mtext-section-literals
233233
CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden -mtext-section-literals
234234

235-
LDELFFLAGS = -r -e __start
235+
LDELFFLAGS = -r -e _start
236236
LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)elf$(DELIM)gnu-elf.ld)
237237
ifneq ($(CONFIG_BUILD_KERNEL),y)
238238
# Flat build and protected elf entry point use crt0,

arch/xtensa/src/lx7/Toolchain.defs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ LDMODULEFLAGS = -r -T $(call CONVERT_PATH,$(TOPDIR)/libs/libc/elf/gnu-elf.ld)
236236
CELFFLAGS = $(CFLAGS) -fvisibility=hidden -mtext-section-literals
237237
CXXELFFLAGS = $(CXXFLAGS) -fvisibility=hidden -mtext-section-literals
238238

239-
LDELFFLAGS = -r -e __start
239+
LDELFFLAGS = -r -e _start
240240
LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)elf$(DELIM)gnu-elf.ld)
241241
ifneq ($(CONFIG_BUILD_KERNEL),y)
242242
# Flat build and protected elf entry point use crt0,

0 commit comments

Comments
 (0)