.file "clone.S"
#include <sysdeps/linux/i386/sysdep.h>
#include <sys/syscall.h>
.text;
#if defined(__PIC__) || defined (__pic__)
.text;
ENTRY (clone)
pushl %ebp;
movl %esp,%ebp;
PUSH_5
MOVE_2
movl $SYS_clone,%eax
orl %ecx,%ecx
jne .L__clone_stack
int $0x80;
.L__clone_after_syscall:
movl %eax,%edx;
test %edx,%edx;
jge L(Lexit);
negl %edx;
pushl %edx;
call L(L4);
LL(L4)
popl %ebx;
addl $_GLOBAL_OFFSET_TABLE_+[.-L(L4)],%ebx;
call ERRNO_LOCATION@PLT;
popl %edx;
movl %edx,(%eax);
movl $-1,%eax;
LL(Lexit)
POP_5
movl %ebp,%esp;
popl %ebp;
#else /* PIC */
.text;
ENTRY (clone)
pushl %ebp;
movl %esp,%ebp;
PUSH_5
MOVE_2
movl $SYS_clone,%eax
orl %ecx,%ecx
jne .L__clone_stack
int $0x80;
.L__clone_after_syscall:
movl %eax,%edx;
test %edx,%edx;
jge L(Lexit);
negl %edx;
pushl %edx;
call ERRNO_LOCATION;
popl %edx;
movl %edx,(%eax);
movl $-1,%eax;
LL(Lexit)
POP_5
movl %ebp,%esp;
popl %ebp;
#endif /* PIC */
ret
.L__clone_stack:
subl $32,%ecx
movl %esp,%esi
movl %ecx,%edi
movl $8,%ecx
cld
rep
movsl
MOVE_5
subl $32,%ecx
int $0x80
movl %esp,%ebp
addl $12,%ebp
jmp .L__clone_after_syscall
#ifdef __ELF__
.type clone,@function
.L_clone_end:
.size clone,.L_clone_end - clone
#endif
+---------------------------------------------------------------------------+
| Jakub Jelinek http://sunsite.mff.cuni.cz/~jj |
| Administrator of SunSITE Czech Republic jj@sunsite.mff.cuni.cz |
| Na Orechovce 7, 162 00 Praha 6, Czech Republic jj@gnu.ai.mit.edu |
| School: MFF UK, Praha; Work: MFF UK & VC CVUT, Praha jj@jfch.vc.cvut.cz |
+---------------------------------------------------------------------------+