From 76d80593426f5f77a51dcf694786576a37f3b208 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 6 Jul 2005 22:40:33 +0000 Subject: Peter S. Mazinger writes: use the __syscall_error.c trick to handle setting errno --- libc/sysdeps/linux/i386/vfork.S | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'libc/sysdeps/linux/i386/vfork.S') diff --git a/libc/sysdeps/linux/i386/vfork.S b/libc/sysdeps/linux/i386/vfork.S index d9b8ab7ca..00a2954d5 100644 --- a/libc/sysdeps/linux/i386/vfork.S +++ b/libc/sysdeps/linux/i386/vfork.S @@ -25,28 +25,13 @@ __vfork: int $0x80 pushl %ecx cmpl $-4095,%eax - jae __syscall_error + jae __error ret -__syscall_error: - negl %eax - pushl %eax -#ifdef __PIC__ - call .Lthere -.Lthere: - popl %ebx - addl $_GLOBAL_OFFSET_TABLE_+[.- .Lthere ], %ebx - call __errno_location@PLT -#else - call __errno_location -#endif - popl %ecx - movl %ecx, (%eax) - xorl %eax, %eax - decl %eax +__error: + call __syscall_error -.Lsize: -.size __vfork,.Lsize-__vfork +.size __vfork,.-__vfork .weak vfork ; vfork = __vfork -- cgit v1.2.3