crt1.c 362 B

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