diff options
Diffstat (limited to 'libc/sysdeps/linux/sparc')
-rw-r--r-- | libc/sysdeps/linux/sparc/crt0.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/sparc/crt0.c b/libc/sysdeps/linux/sparc/crt0.c index 8272f3dde..81caf1eed 100644 --- a/libc/sysdeps/linux/sparc/crt0.c +++ b/libc/sysdeps/linux/sparc/crt0.c @@ -28,16 +28,16 @@ void (*mainp)(int argc,void *argv,void *envp) = main; extern void __uClibc_main(int argc,void *argv,void *envp); -void _start(unsigned int first_arg) +void _start(void) { unsigned int argc; char **argv, **envp; unsigned long *stack; - stack = (unsigned long*) &first_arg; - argc = *(stack - 1); - argv = (char **) stack; - envp = (char **)stack + argc + 1; + stack = ((unsigned long*)__builtin_frame_address(0))+16; + argc = *stack; + argv = (char **)stack + 1; + envp = (char **)stack + argc + 2; __uClibc_main(argc, argv, envp); } |