mirror of
https://github.com/fluencelabs/musl
synced 2025-04-25 07:12:15 +00:00
We should probably upstream these. The __libc_start_main is pretty clearly wrong in the current upstream.
16 lines
418 B
C
16 lines
418 B
C
#define START "_start"
|
|
#define _dlstart_c _start_c
|
|
#include "../ldso/dlstart.c"
|
|
|
|
int main();
|
|
void _init(void) __attribute__((weak));
|
|
void _fini(void) __attribute__((weak));
|
|
_Noreturn int __libc_start_main(int (*)(), int, char **,
|
|
void (*)(), void(*)());
|
|
|
|
__attribute__((__visibility__("hidden")))
|
|
_Noreturn void __dls2(unsigned char *base, size_t *sp)
|
|
{
|
|
__libc_start_main(main, *sp, (void *)(sp+1), _init, _fini);
|
|
}
|