소스 검색

Since __syscall_error is a C func, we need to store the syscall return value
in the appropriate register. Otherwise, errno is set to random garbage.

Manuel Novoa III 20 년 전
부모
커밋
47167cdc5d
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      libc/sysdeps/linux/mips/clone.S

+ 5 - 0
libc/sysdeps/linux/mips/clone.S

@@ -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