summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386/clone.S
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-08-17 07:36:19 +0000
committerGreg McGary <greg@mcgary.org>2000-08-17 07:36:19 +0000
commit9e25f6e29bd6728ad4012e3c4c9b11a96b7a4acf (patch)
treea04dbc79fe333384feb84bd24a39f4e58631f01d /sysdeps/unix/sysv/linux/i386/clone.S
parent9a81430bf923de1145cbf52d5f1efe0bdce68e5b (diff)
* sysdeps/i386/fpu/s_frexp.S: Check bounds.
Wrap extern symbols in BP_SYM (). * sysdeps/i386/fpu/s_frexpf.S: Likewise. * sysdeps/i386/fpu/s_frexpl.S: Likewise. * sysdeps/i386/fpu/s_remquo.S: Likewise. * sysdeps/i386/fpu/s_remquof.S: Likewise. * sysdeps/i386/fpu/s_remquol.S: Likewise. * sysdeps/i386/fpu/s_sincos.S: Likewise. * sysdeps/i386/fpu/s_sincosf.S: Likewise. * sysdeps/i386/fpu/s_sincosl.S: Likewise. * sysdeps/unix/sysv/linux/i386/clone.S: Likewise. * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/clone.S')
-rw-r--r--sysdeps/unix/sysv/linux/i386/clone.S26
1 files changed, 17 insertions, 9 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/clone.S b/sysdeps/unix/sysv/linux/i386/clone.S
index 7a2025b53c..e22a053208 100644
--- a/sysdeps/unix/sysv/linux/i386/clone.S
+++ b/sysdeps/unix/sysv/linux/i386/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@tamu.edu)
@@ -24,21 +24,29 @@
#define _ERRNO_H 1
#include <bits/errno.h>
#include <asm-syntax.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
+#define PARMS LINKAGE /* no space for saved regs */
+#define FUNC PARMS
+#define STACK FUNC+4
+#define FLAGS STACK+PTR_SIZE
+#define ARG FLAGS+4
+
.text
-ENTRY(__clone)
+ENTRY (BP_SYM (__clone))
/* Sanity check arguments. */
movl $-EINVAL,%eax
- movl 4(%esp),%ecx /* no NULL function pointers */
+ movl FUNC(%esp),%ecx /* no NULL function pointers */
#ifdef PIC
jecxz SYSCALL_ERROR_LABEL
#else
testl %ecx,%ecx
jz SYSCALL_ERROR_LABEL
#endif
- movl 8(%esp),%ecx /* no NULL stack pointers */
+ movl STACK(%esp),%ecx /* no NULL stack pointers */
#ifdef PIC
jecxz SYSCALL_ERROR_LABEL
#else
@@ -48,17 +56,17 @@ ENTRY(__clone)
/* Insert the argument onto the new stack. */
subl $8,%ecx
- movl 16(%esp),%eax /* no negative argument counts */
+ movl ARG(%esp),%eax /* no negative argument counts */
movl %eax,4(%ecx)
/* Save the function pointer as the zeroth argument.
It will be popped off in the child in the ebx frobbing below. */
- movl 4(%esp),%eax
+ movl FUNC(%esp),%eax
movl %eax,0(%ecx)
/* Do the system call */
pushl %ebx
- movl 16(%esp),%ebx
+ movl FLAGS+4(%esp),%ebx
movl $SYS_ify(clone),%eax
int $0x80
popl %ebx
@@ -82,6 +90,6 @@ L(here):
pushl %eax
call JUMPTARGET (_exit)
-PSEUDO_END (__clone)
+PSEUDO_END (BP_SYM (__clone))
-weak_alias (__clone, clone)
+weak_alias (BP_SYM (__clone), BP_SYM (clone))