From: John Hodge Date: Tue, 5 Mar 2013 02:00:40 +0000 (+0800) Subject: Usermode/crt0 - Patching to support cross-compiler X-Git-Tag: rel0.15~542 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=e2eb3fb11c16b2a57f2cf97a74f796d2dceca1d2;p=tpg%2Facess2.git Usermode/crt0 - Patching to support cross-compiler --- diff --git a/Usermode/Libraries/crt0.o_src/crt0.c b/Usermode/Libraries/crt0.o_src/crt0.c index f506d72b..8363aea9 100644 --- a/Usermode/Libraries/crt0.o_src/crt0.c +++ b/Usermode/Libraries/crt0.o_src/crt0.c @@ -6,11 +6,15 @@ typedef void (*exithandler_t)(void); typedef void (*constructor_t)(void); +constructor_t _crtbegin_ctors[0] __attribute__((section(".ctors"))); + exithandler_t _crt0_exit_handler; -extern constructor_t _crtbegin_ctors[]; +//extern constructor_t _crtbegin_ctors[]; extern void _exit(int status) __attribute__((noreturn)); extern int main(int argc, char *argv[], char **envp); +void _start(int argc, char *argv[], char **envp) __attribute__ ((alias("start"))); + void start(int argc, char *argv[], char **envp) { int i; diff --git a/Usermode/Libraries/crt0.o_src/crtbegin.c b/Usermode/Libraries/crt0.o_src/crtbegin.c index 8e18f89b..e69de29b 100644 --- a/Usermode/Libraries/crt0.o_src/crtbegin.c +++ b/Usermode/Libraries/crt0.o_src/crtbegin.c @@ -1,2 +0,0 @@ - -void *_crtbegin_ctors[0] __attribute__((section(".ctors")));