Skip to content

Commit 0021d66

Browse files
committed
tools/nolibc: crt: mark _start_c() as used
During LTO the reference from the asm startup code to the _start_c() function is not visible and _start_c() is removed. This will then lead to errors during linking. As _start_c() is indeed always used, mark it as such. Acked-by: Willy Tarreau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Thomas Weißschuh <[email protected]>
1 parent 22ba81c commit 0021d66

File tree

1 file changed

+1
-1
lines changed
  • tools/include/nolibc

1 file changed

+1
-1
lines changed

tools/include/nolibc/crt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern void (*const __init_array_end[])(int, char **, char**) __attribute__((wea
2222
extern void (*const __fini_array_start[])(void) __attribute__((weak));
2323
extern void (*const __fini_array_end[])(void) __attribute__((weak));
2424

25-
__attribute__((weak))
25+
__attribute__((weak,used))
2626
void _start_c(long *sp)
2727
{
2828
long argc;

0 commit comments

Comments
 (0)