2013-07-26 01:49:14 -04:00
|
|
|
#include <features.h>
|
|
|
|
|
2015-04-13 02:56:26 -04:00
|
|
|
#define START "_start"
|
|
|
|
|
2013-07-26 01:49:14 -04:00
|
|
|
#include "crt_arch.h"
|
|
|
|
|
2018-06-22 08:07:42 -07:00
|
|
|
int main(int argc, char *argv[]);
|
|
|
|
void _init(void) __attribute__((weak));
|
|
|
|
void _fini(void) __attribute__((weak));
|
2013-07-26 01:49:14 -04:00
|
|
|
_Noreturn int __libc_start_main(int (*)(), int, char **,
|
2018-06-22 08:07:42 -07:00
|
|
|
void (*)(), void(*)());
|
2013-07-26 01:49:14 -04:00
|
|
|
|
2015-04-13 02:56:26 -04:00
|
|
|
void _start_c(long *p)
|
2013-07-26 01:49:14 -04:00
|
|
|
{
|
|
|
|
int argc = p[0];
|
|
|
|
char **argv = (void *)(p+1);
|
2018-06-22 08:07:42 -07:00
|
|
|
__libc_start_main(main, argc, argv, _init, _fini);
|
2013-07-26 01:49:14 -04:00
|
|
|
}
|