OSDN Git Service

Bug 618, Thomas Chou: update crt to new 0.9.28 uClibc style
authorMike Frysinger <vapier@gentoo.org>
Wed, 4 Jan 2006 07:03:57 +0000 (07:03 -0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 4 Jan 2006 07:03:57 +0000 (07:03 -0000)
libc/sysdeps/linux/nios/crt1.S [moved from libc/sysdeps/linux/nios/crt0.S with 82% similarity]

similarity index 82%
rename from libc/sysdeps/linux/nios/crt0.S
rename to libc/sysdeps/linux/nios/crt1.S
index bbf4ede..98777e8 100644 (file)
@@ -27,7 +27,8 @@ Cambridge, MA 02139, USA.  */
     .type   __start,@function
     .weak   _init
     .weak   _fini
-    .type   __uClibc_start_main,@function
+    .type   main,@function
+    .type   __uClibc_main,@function
     .type   __h_errno_location, @function
     .type   _stdio_init, @function
     .type   _stdio_term, @function
@@ -38,15 +39,17 @@ _start:
        nop
        nop
 
-       lds     %o0,[%sp, (REGWIN_SZ / 4) + 0]  // main's argc
-       lds     %o1,[%sp, (REGWIN_SZ / 4) + 1]  // main's argv
-       lds     %o2,[%sp, (REGWIN_SZ / 4) + 2]  // main's envp
+       MOVIA   %o0, main@h
+       lds     %o1,[%sp, (REGWIN_SZ / 4) + 0]  // main's argc
+       lds     %o2,[%sp, (REGWIN_SZ / 4) + 1]  // main's argv
 
        MOVIA   %o3, _init@h
        MOVIA   %o4, _fini@h
-       MOVIA   %o5, __uClibc_start_main@h
-       
-       call    %o5
+       mov     %o5, %i0        /* rtld_fini */
+       mov     %o6, %sp        /* stack_end */
+       MOVIA   %o7, __uClibc_main@h
+
+       call    %o7
        nop
 
 
@@ -54,4 +57,3 @@ _start:
 __exit:
        MOVIP   %g1, __NR_exit
        trap    63
-       
\ No newline at end of file