mirror of
git://git.musl-libc.org/musl
synced 2024-12-18 21:05:13 +00:00
9b95fd0944
this cleans up what had become widespread direct inline use of "GNU C"
style attributes directly in the source, and lowers the barrier to
increased use of hidden visibility, which will be useful to recovering
some of the efficiency lost when the protected visibility hack was
dropped in commit dc2f368e56
, especially
on archs where the PLT ABI is costly.
20 lines
362 B
C
20 lines
362 B
C
#include <features.h>
|
|
#include "libc.h"
|
|
|
|
#define START "_start"
|
|
|
|
#include "crt_arch.h"
|
|
|
|
int main();
|
|
weak void _init();
|
|
weak void _fini();
|
|
_Noreturn int __libc_start_main(int (*)(), int, char **,
|
|
void (*)(), void(*)(), void(*)());
|
|
|
|
void _start_c(long *p)
|
|
{
|
|
int argc = p[0];
|
|
char **argv = (void *)(p+1);
|
|
__libc_start_main(main, argc, argv, _init, _fini, 0);
|
|
}
|