summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-10 02:03:25 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-10 02:03:25 +0000
commit771c60ca859f10e64489ec3aa18e4543436ba688 (patch)
treef5f3380efc214b4bdabd8ba1debe8d9537905e76 /libc/sysdeps/linux
parent22eff99ada7e5c18e2b2962a8c03384c579ec4c8 (diff)
more fixes by Thomas Chou in Bug 618
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/nios/__longjmp.S1
-rw-r--r--libc/sysdeps/linux/nios/clone.S4
-rw-r--r--libc/sysdeps/linux/nios/setjmp.S1
-rw-r--r--libc/sysdeps/linux/nios/vfork.S34
4 files changed, 19 insertions, 21 deletions
diff --git a/libc/sysdeps/linux/nios/__longjmp.S b/libc/sysdeps/linux/nios/__longjmp.S
index c2b1979cc..1b4fa6a56 100644
--- a/libc/sysdeps/linux/nios/__longjmp.S
+++ b/libc/sysdeps/linux/nios/__longjmp.S
@@ -16,6 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <features.h>
#define _ASM
#define _SETJMP_H
#include <bits/setjmp.h>
diff --git a/libc/sysdeps/linux/nios/clone.S b/libc/sysdeps/linux/nios/clone.S
index a3098f5f8..c4799c5b2 100644
--- a/libc/sysdeps/linux/nios/clone.S
+++ b/libc/sysdeps/linux/nios/clone.S
@@ -21,7 +21,7 @@
and invokes a function in the right context after its all over. */
#include <asm/errno.h>
-#include <asm/unistd.h>
+#include <sys/syscall.h>
#include "NM_Macros.S"
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
@@ -87,5 +87,5 @@ __thread_start:
.size __thread_start, .-__thread_start
-.globl clone;
+.weak clone
clone = __clone
diff --git a/libc/sysdeps/linux/nios/setjmp.S b/libc/sysdeps/linux/nios/setjmp.S
index 70bd75c5d..c2851461c 100644
--- a/libc/sysdeps/linux/nios/setjmp.S
+++ b/libc/sysdeps/linux/nios/setjmp.S
@@ -16,6 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <features.h>
#define _ASM
#define _SETJMP_H
#include <bits/setjmp.h>
diff --git a/libc/sysdeps/linux/nios/vfork.S b/libc/sysdeps/linux/nios/vfork.S
index 22b3c30cd..cf95c5a34 100644
--- a/libc/sysdeps/linux/nios/vfork.S
+++ b/libc/sysdeps/linux/nios/vfork.S
@@ -9,7 +9,11 @@
*
* Written by Wentao Xu <wentao@microtronix.com>
*/
-#include <asm/unistd.h>
+
+#include <features.h>
+
+#include <bits/errno.h>
+#include <sys/syscall.h>
#include "NM_Macros.S"
#ifndef __NR_vfork
@@ -18,15 +22,11 @@
.text
.align 2
- .globl errno
- .globl vfork
- .globl __libc_vfork
+ .globl __vfork
#if defined __HAVE_ELF__
- .type vfork,@function
- .type __libc_vfork,@function
+ .type __vfork,@function
#endif
-vfork:
-__libc_vfork:
+__vfork:
MOVIP %g1, __NR_vfork
trap 63
@@ -34,25 +34,21 @@ __libc_vfork:
not %g1 /* (unsigned long) -4096 */
cmp %o0, %g1
skps cc_hi
- jmp %o7
- nop
-
+ jmp %o7
+ nop
+
fix_errno:
neg %o0
save %sp, -16
MOVIA %g1, __errno_location@h
call %g1
- nop
+ nop
st [%o0], %i0 /* store errno */
xor %i0, %i0
subi %i0, 1 /* retval=-1 */
ret
- restore
-
-
-
-
-
-
+ restore
+.size __vfork,.-__vfork
+strong_alias(__vfork,vfork)