diff options
Diffstat (limited to 'libc/arch-x86')
-rw-r--r-- | libc/arch-x86/bionic/clone.S | 5 | ||||
-rw-r--r-- | libc/arch-x86/syscalls.mk | 2 | ||||
-rw-r--r-- | libc/arch-x86/syscalls/__sys_clone.S (renamed from libc/arch-x86/syscalls/__clone.S) | 17 |
3 files changed, 16 insertions, 8 deletions
diff --git a/libc/arch-x86/bionic/clone.S b/libc/arch-x86/bionic/clone.S index 361808d..3b50cc3 100644 --- a/libc/arch-x86/bionic/clone.S +++ b/libc/arch-x86/bionic/clone.S @@ -48,3 +48,8 @@ __pthread_clone: popl %ecx popl %ebx ret + +/* XXX: TODO: Add __bionic_clone here + * See bionic/bionic_clone.c and arch-arm/bionic/clone.S + * for more details... + */
\ No newline at end of file diff --git a/libc/arch-x86/syscalls.mk b/libc/arch-x86/syscalls.mk index 86d2308..e718e18 100644 --- a/libc/arch-x86/syscalls.mk +++ b/libc/arch-x86/syscalls.mk @@ -5,7 +5,7 @@ syscall_src += arch-x86/syscalls/_exit_thread.S syscall_src += arch-x86/syscalls/__fork.S syscall_src += arch-x86/syscalls/_waitpid.S syscall_src += arch-x86/syscalls/waitid.S -syscall_src += arch-x86/syscalls/__clone.S +syscall_src += arch-x86/syscalls/__sys_clone.S syscall_src += arch-x86/syscalls/execve.S syscall_src += arch-x86/syscalls/setuid.S syscall_src += arch-x86/syscalls/getuid.S diff --git a/libc/arch-x86/syscalls/__clone.S b/libc/arch-x86/syscalls/__sys_clone.S index 5862129..172d6af 100644 --- a/libc/arch-x86/syscalls/__clone.S +++ b/libc/arch-x86/syscalls/__sys_clone.S @@ -2,19 +2,21 @@ #include <sys/linux-syscalls.h> .text - .type __clone, @function - .globl __clone + .type __sys_clone, @function + .globl __sys_clone .align 4 -__clone: +__sys_clone: pushl %ebx pushl %ecx pushl %edx pushl %esi - mov 20(%esp), %ebx - mov 24(%esp), %ecx - mov 28(%esp), %edx - mov 32(%esp), %esi + pushl %edi + mov 24(%esp), %ebx + mov 28(%esp), %ecx + mov 32(%esp), %edx + mov 36(%esp), %esi + mov 40(%esp), %edi movl $__NR_clone, %eax int $0x80 cmpl $-129, %eax @@ -25,6 +27,7 @@ __clone: addl $4, %esp orl $-1, %eax 1: + popl %edi popl %esi popl %edx popl %ecx |