OSDN Git Service

Since __syscall_error is a C func, we need to store the syscall return value
authorManuel Novoa III <mjn3@codepoet.org>
Sat, 23 Jul 2005 14:02:57 +0000 (14:02 -0000)
committerManuel Novoa III <mjn3@codepoet.org>
Sat, 23 Jul 2005 14:02:57 +0000 (14:02 -0000)
in the appropriate register.  Otherwise, errno is set to random garbage.

libc/sysdeps/linux/mips/clone.S

index 3b87904..079d2be 100644 (file)
@@ -72,6 +72,11 @@ __clone:
        /* Something bad happened -- no child created */
 error:
        addiu           sp,32
+
+       /* uClibc change -- start */
+       move            a0,v0           /* Pass return val to C function. */
+       /* uClibc change -- stop */
+
 #ifdef __PIC__
        la              t9,__syscall_error
        jr              t9