From 569b0e03fb08ea519434d26ee77aeb3a9cdeedf3 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Fri, 10 Jun 2005 18:25:35 +0000 Subject: Remove TEXTREL relocations for ARM. Hide __syscall_error from outside libc. From Peter Mazinger. --- libc/sysdeps/linux/arm/vfork.S | 63 ++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 39 deletions(-) (limited to 'libc/sysdeps/linux/arm/vfork.S') diff --git a/libc/sysdeps/linux/arm/vfork.S b/libc/sysdeps/linux/arm/vfork.S index 9d18945d1..eecf56b8c 100644 --- a/libc/sysdeps/linux/arm/vfork.S +++ b/libc/sysdeps/linux/arm/vfork.S @@ -20,52 +20,37 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#define _ERRNO_H +#include #include - - - .text - .global vfork; - .type vfork,%function - .align 4; \ - - - +#ifdef __NR_fork + .text + .global vfork + .type vfork,%function + .align 4 vfork: #ifdef __NR_vfork - swi __NR_vfork - cmn r0, #4096 - movcc pc, lr - - /* Check if vfork even exists. */ - ldr r1, =-ENOSYS - teq r0, r1 - bne __syscall_error + swi __NR_vfork + cmn r0, #4096 + movcc pc, lr + + /* Check if vfork even exists. */ + ldr r1, =-ENOSYS + teq r0, r1 + bne __error #endif - /* If we don't have vfork, use fork. */ - swi __NR_fork - cmn r0, #4096 + /* If we don't have vfork, use fork. */ + swi __NR_fork + cmn r0, #4096 - /* Syscal worked. Return to child/parent */ - movcc pc, lr - -__syscall_error: - - /* Looks like the syscall choked -- set errno */ - ldr r3, .L4 - /* Calculate the - of the syscall result, in case we need it */ - rsb r2, r0, $0 - - /* errno = -result */ - str r2, [r9,r3] - - /* return -1 */ - mvn r0, $0 - mov pc, lr - -.L4: .word errno + /* Syscal worked. Return to child/parent */ + movcc pc, lr +__error: + b __syscall_error + .size vfork,.-vfork +#endif -- cgit v1.2.3