summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/nios2/vfork.S
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-24 17:18:19 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-24 17:18:19 +0000
commit48143d8a8f92fd69d95564516fd1b7cf122511b1 (patch)
tree60b6a07f9836b7885e6ee2cc2bfead197b554e2b /libc/sysdeps/linux/nios2/vfork.S
parentc3f6501060987d967a28495b009cd0da9da25252 (diff)
fork/vfork weak in libc, strong in libpthread
Diffstat (limited to 'libc/sysdeps/linux/nios2/vfork.S')
-rw-r--r--libc/sysdeps/linux/nios2/vfork.S16
1 files changed, 10 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/nios2/vfork.S b/libc/sysdeps/linux/nios2/vfork.S
index f8b3179d0..c0e4a7703 100644
--- a/libc/sysdeps/linux/nios2/vfork.S
+++ b/libc/sysdeps/linux/nios2/vfork.S
@@ -16,12 +16,16 @@
#include <bits/errno.h>
#include <sys/syscall.h>
-#ifdef __NR_fork
+#ifndef __NR_vfork
+#define __NR_vfork __NR_fork /* uClinux-2.0 only has fork which is vfork */
+#endif
+
.text
-.global vfork
-.type vfork,%function
+.global __vfork
+.hidden __vfork
+.type __vfork,%function
.align 4
-vfork:
+__vfork:
movui r2, TRAP_ID_SYSCALL
movui r3, __NR_vfork
trap
@@ -47,6 +51,6 @@ fix_errno:
addi sp, sp, 8
ret
-.size vfork,.-vfork
+.size __vfork,.-__vfork
+weak_alias(__vfork,vfork)
libc_hidden_def(vfork)
-#endif