From: John Hodge Date: Fri, 2 Dec 2011 03:02:31 +0000 (+0800) Subject: Usermode/crt0 - Fixed crt0 not calling _exit X-Git-Tag: rel0.14~37 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=fd3f36b329acc823764bb43cb8452e8b41ec511b;p=tpg%2Facess2.git Usermode/crt0 - Fixed crt0 not calling _exit --- diff --git a/Usermode/Libraries/crt0.o_src/crt0.c b/Usermode/Libraries/crt0.o_src/crt0.c index 7c0e3ff9..cb427722 100644 --- a/Usermode/Libraries/crt0.o_src/crt0.c +++ b/Usermode/Libraries/crt0.o_src/crt0.c @@ -8,8 +8,9 @@ typedef void (*constructor_t)(void); exithandler_t _crt0_exit_handler; extern constructor_t _crtbegin_ctors[]; +extern void _exit(int status) __attribute__((noreturn)); -int start(int argc, char *argv[], char **envp) +void start(int argc, char *argv[], char **envp) { int i; int rv; @@ -21,6 +22,6 @@ int start(int argc, char *argv[], char **envp) if( _crt0_exit_handler ) _crt0_exit_handler(); - - return rv; + + _exit(rv); }