Update of /cvsroot/linux-vax/toolchain/patches
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6416
Added Files:
uclibc-000005-crt0-part3.patch
Log Message:
- This is an implementation that actually seems to work. atexit() and
all the other funny stuff isn't tested yet. Also, more fancy stuff like
printf() doesn't work right now because of __udev and __urem missing.
- [x] We'll get there.
--- NEW FILE: uclibc-000005-crt0-part3.patch ---
diff -Nurp src-uclibc-fresh/libc/sysdeps/linux/vax/crt1.S src-uclibc-hacked/libc/sysdeps/linux/vax/crt1.S
--- src-uclibc-fresh/libc/sysdeps/linux/vax/crt1.S 2005-09-25 14:37:42.000000000 +0200
+++ src-uclibc-hacked/libc/sysdeps/linux/vax/crt1.S 2005-09-25 14:38:24.000000000 +0200
@@ -30,22 +30,15 @@ _start:
movl $0, %fp /* FP = 0, since this is the */
/* top-most stack frame */
-
+ movl %sp, %r0 /* R0 = %sp */
movl (%sp)+, %r4 /* R4 = argc */
movl %sp, %r3 /* R3 = argv = &argv[0] */
- addl3 %r4, $1, %r0 /* R0 = argc+1 (including the */
- /* trailing NULL) */
- ashl $2, %r0, %r0 /* R0 *= 4 (length of pointer */
- /* array in bytes) */
- addl3 %r3, %r0, %r2 /* R2 = env = &env[0] (= argv + */
- /* length of argv) */
#if (defined L_crt1 || defined L_gcrt1) && defined __UCLIBC_CTOR_DTOR__
+ pushl %r0 # stack_end
+ pushl $2 # rtld_fini, some magic value stolen from the MIPS port
pushl $_fini
pushl $_init
-
- /* Push envp, argc, and argc arguments to __uClibc_start_main() on the stack */
- pushl %r2 /* Environment pointer */
pushl %r3 /* Argument pointer */
pushl %r4 /* And the argument count */
pushl $main /* main() */
@@ -59,7 +52,7 @@ _start:
* void (*rtld_fini) (void),
* void *stack_end);
*/
- calls $5, __uClibc_main
+ calls $7, __uClibc_main
#else
/* start to load the arguments from the stack */
/* arguments are on ap stack */
|