chiark / gitweb /
[PATCH] sync klibc with release 0.95
[elogind.git] / klibc / klibc / arch / ppc / crt0.S
index f7274b07dd549cde876985c3ac13f7dfa9422a9c..282f8411e4079749c3c90ac3b36d36b99d6ae119 100644 (file)
@@ -1,12 +1,5 @@
 #
 # arch/ppc/crt0.S
-#
-# void _start(void)
-# {
-#    /* Divine up argc, argv, and envp */
-#    environ = envp;
-#    exit(main(argc, argv, envp));
-# } 
 #
 
        .text
        .type _start,@function
        .globl _start
 _start:
-       lwz     3,0(1)
-       addi    4,1,4
-       addi    5,1,8
-       slwi    0,3,2
-       add     5,5,0
-       li      0,0
-       stwu    0,-16(1)
-       lis     9,environ@ha
-       stw     5,environ@l(9)
-       bl      main
-       bl      exit
+       stwu    1,-16(1)
+       addi    3,1,16
+       /*
+        * the SVR4abippc.pdf specifies r7 as a pointer to 
+        * a termination function pointer.
+        * It is unused on Linux.
+        */
+       mr      4,7
+       bl      __libc_init
        
        .size _start,.-_start