diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2006-01-24 17:18:19 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2006-01-24 17:18:19 +0000 |
commit | 48143d8a8f92fd69d95564516fd1b7cf122511b1 (patch) | |
tree | 60b6a07f9836b7885e6ee2cc2bfead197b554e2b /libc/sysdeps/linux/powerpc | |
parent | c3f6501060987d967a28495b009cd0da9da25252 (diff) |
fork/vfork weak in libc, strong in libpthread
Diffstat (limited to 'libc/sysdeps/linux/powerpc')
-rw-r--r-- | libc/sysdeps/linux/powerpc/vfork.S | 19 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/vfork.c | 6 |
2 files changed, 16 insertions, 9 deletions
diff --git a/libc/sysdeps/linux/powerpc/vfork.S b/libc/sysdeps/linux/powerpc/vfork.S index 5b4bcc069..a55b6fbc9 100644 --- a/libc/sysdeps/linux/powerpc/vfork.S +++ b/libc/sysdeps/linux/powerpc/vfork.S @@ -1,25 +1,32 @@ +/* + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include <features.h> #include <sys/syscall.h> #ifndef __NR_vfork /* No vfork so use fork instead */ -strong_alias(fork,vfork) -strong_alias(vfork,__libc_fork) +strong_alias(fork,__libc_fork) +hidden_strong_alias(__libc_fork,__vfork) #else .text -.global vfork -.type vfork,@function +.global __vfork +.hidden __vfork +.type __vfork,@function .type __syscall_error,@function -vfork: +__vfork: li 0, __NR_vfork sc bnslr+ b __syscall_error -.size vfork,.-vfork +.size __vfork,.-__vfork #endif +weak_alias(__vfork,vfork) libc_hidden_def(vfork) diff --git a/libc/sysdeps/linux/powerpc/vfork.c b/libc/sysdeps/linux/powerpc/vfork.c index 16d66bd24..1b8e3cd35 100644 --- a/libc/sysdeps/linux/powerpc/vfork.c +++ b/libc/sysdeps/linux/powerpc/vfork.c @@ -3,15 +3,13 @@ #include <errno.h> #include <sys/syscall.h> -libc_hidden_proto(vfork) - #define __syscall_clobbers \ "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" #define __syscall_return(type) \ return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), \ (type) __sc_ret -pid_t vfork(void) +pid_t attribute_hidden __vfork(void) { unsigned long __sc_ret, __sc_err; register unsigned long __sc_0 __asm__ ("r0"); @@ -48,4 +46,6 @@ pid_t vfork(void) __syscall_return (pid_t); } +libc_hidden_proto(vfork) +weak_alias(__vfork,vfork) libc_hidden_def(vfork) |