summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/sparc/clone.S8
-rw-r--r--libc/sysdeps/linux/sparc/fork.S13
-rw-r--r--libc/sysdeps/linux/sparc/vfork.S24
3 files changed, 26 insertions, 19 deletions
diff --git a/libc/sysdeps/linux/sparc/clone.S b/libc/sysdeps/linux/sparc/clone.S
index 9af88688c..06638570c 100644
--- a/libc/sysdeps/linux/sparc/clone.S
+++ b/libc/sysdeps/linux/sparc/clone.S
@@ -25,10 +25,10 @@
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
- .text
- .align 4
- .globl __clone
- .type __clone,@function
+.text
+.global __clone
+.type __clone,%function
+.align 4
__clone:
save %sp,-96,%sp
diff --git a/libc/sysdeps/linux/sparc/fork.S b/libc/sysdeps/linux/sparc/fork.S
index 1b271060b..c382f4b4e 100644
--- a/libc/sysdeps/linux/sparc/fork.S
+++ b/libc/sysdeps/linux/sparc/fork.S
@@ -21,10 +21,10 @@
#include <sys/syscall.h>
-.text;
-.global __libc_fork;
-.align 4;
-.type __libc_fork,@function;
+.text
+.global __libc_fork
+.type __libc_fork,%function
+.align 4
__libc_fork:
mov __NR_fork, %g1
@@ -43,6 +43,7 @@ __libc_fork:
retl
and %o0, %o1, %o0
-.size __libc_fork,.-__libc_fork;
-.weak fork; fork = __libc_fork
+.size __libc_fork,.-__libc_fork
+.weak fork
+ fork = __libc_fork
diff --git a/libc/sysdeps/linux/sparc/vfork.S b/libc/sysdeps/linux/sparc/vfork.S
index 0df960d65..854b66182 100644
--- a/libc/sysdeps/linux/sparc/vfork.S
+++ b/libc/sysdeps/linux/sparc/vfork.S
@@ -22,16 +22,18 @@
#include <sys/syscall.h>
#ifndef __NR_vfork
-/* uClinux-2.0 only has fork which is really vfork */
-#define __NR_vfork __NR_fork
-#endif
+/* No vfork so use fork instead */
+.weak vfork
+ vfork = __libc_fork
-.text;
-.global vfork;
-.align 4;
-.type vfork,@function;
+#else
-vfork:
+.text
+.global vfork
+.type vfork,%function
+.align 4
+
+__vfork:
mov __NR_vfork, %g1
ta 0x10
bcc,a 9000f
@@ -48,5 +50,9 @@ vfork:
retl
and %o0, %o1, %o0
-.size vfork,.-vfork;
+.size __vfork,.-__vfork
+
+.weak vfork
+ vfork = __vfork
+#endif /* __NR_vfork */