From a0c43a80469d816549aa93e2ad663af2c6a8e6cf Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Fri, 31 Jan 2020 20:23:55 +0900 Subject: [PATCH] Add fork and execfve syscall stubs to userspace libc --- libc/syscall.S | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/libc/syscall.S b/libc/syscall.S index 7d53714..9efebd8 100644 --- a/libc/syscall.S +++ b/libc/syscall.S @@ -222,3 +222,26 @@ cxsendrecv: popl %ebx ret + +.global fork +fork: + pushl %ebx + + movl $SYS_FORK, %eax + int $SYSCALL_POSIX + + popl %ebx + ret + +.global execfve +execfve: + pushl %ebx + + movl $SYS_EXECFVE, %eax + movl 8(%esp), %ebx + movl 12(%esp), %ecx + movl 16(%esp), %edx + int $SYSCALL_POSIX + + popl %ebx + ret -- 2.47.3