Commit dffeb81a authored by Willy Tarreau's avatar Willy Tarreau Committed by Paul E. McKenney

tools/nolibc/arch: mark the _start symbol as weak

By doing so we can link together multiple C files that have been compiled
with nolibc and which each have a _start symbol.
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 07f47ea0
......@@ -183,6 +183,7 @@ struct sys_stat_struct {
/* startup code */
asm(".section .text\n"
".weak _start\n"
".global _start\n"
"_start:\n"
"ldr x0, [sp]\n" // argc (x0) was in the stack
......
......@@ -176,6 +176,7 @@ struct sys_stat_struct {
/* startup code */
asm(".section .text\n"
".weak _start\n"
".global _start\n"
"_start:\n"
#if defined(__THUMBEB__) || defined(__THUMBEL__)
......
......@@ -175,6 +175,7 @@ struct sys_stat_struct {
*
*/
asm(".section .text\n"
".weak _start\n"
".global _start\n"
"_start:\n"
"pop %eax\n" // argc (first arg, %eax)
......
......@@ -190,6 +190,7 @@ struct sys_stat_struct {
/* startup code, note that it's called __start on MIPS */
asm(".section .text\n"
".weak __start\n"
".set nomips16\n"
".global __start\n"
".set noreorder\n"
......
......@@ -184,6 +184,7 @@ struct sys_stat_struct {
/* startup code */
asm(".section .text\n"
".weak _start\n"
".global _start\n"
"_start:\n"
".option push\n"
......
......@@ -198,6 +198,7 @@ struct sys_stat_struct {
*
*/
asm(".section .text\n"
".weak _start\n"
".global _start\n"
"_start:\n"
"pop %rdi\n" // argc (first arg, %rdi)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment