summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/nios2/clone.S
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-10 02:06:25 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-10 02:06:25 +0000
commit12cecc8261e8da2703bbeb3f6bd1c933a475ca9c (patch)
tree816a67edd422bd672712e9a5f6e75216a8892502 /libc/sysdeps/linux/nios2/clone.S
parent771c60ca859f10e64489ec3aa18e4543436ba688 (diff)
more fixes by Thomas Chou in Bug 618
Diffstat (limited to 'libc/sysdeps/linux/nios2/clone.S')
-rw-r--r--libc/sysdeps/linux/nios2/clone.S23
1 files changed, 15 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/nios2/clone.S b/libc/sysdeps/linux/nios2/clone.S
index 4dd8745cd..ba514c40b 100644
--- a/libc/sysdeps/linux/nios2/clone.S
+++ b/libc/sysdeps/linux/nios2/clone.S
@@ -9,18 +9,18 @@
*
* Written by Wentao Xu <wentao@microtronix.com>
*/
-#include <asm/errno.h>
-#include <asm/unistd.h>
+#define _ERRNO_H
+#include <bits/errno.h>
+#include <sys/syscall.h>
+
+#ifdef __NR_clone
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
.text
-.balign 4
-.type clone,@function
-.globl clone;
-clone:
-.type __clone,@function
-.globl __clone;
+.global __clone
+.type __clone,%function
+.align 4
__clone:
addi sp,sp,-8
mov r8,r4
@@ -64,3 +64,10 @@ CLONE_OK:
ldw r16,0(sp)
addi sp,sp,8
ret
+
+.size __clone,.-__clone
+
+.weak clone
+ clone = __clone
+
+#endif