crt1.c 354 B

12345678910111213141516
  1. #include <features.h>
  2. #include "crt_arch.h"
  3. int main();
  4. void _init() __attribute__((weak));
  5. void _fini() __attribute__((weak));
  6. _Noreturn int __libc_start_main(int (*)(), int, char **,
  7. void (*)(), void(*)(), void(*)());
  8. void __cstart(long *p)
  9. {
  10. int argc = p[0];
  11. char **argv = (void *)(p+1);
  12. __libc_start_main(main, argc, argv, _init, _fini, 0);
  13. }