]> git.corax.cc Git - corax/commitdiff
Add fork and execfve syscall stubs to userspace libc
authorMatthias Kruk <m@m10k.eu>
Fri, 31 Jan 2020 11:23:55 +0000 (20:23 +0900)
committerMatthias Kruk <m@m10k.eu>
Fri, 31 Jan 2020 11:23:55 +0000 (20:23 +0900)
libc/syscall.S

index 7d537144ef505a04ae35ae3ec265295435855b96..9efebd86ede86da8596f9a9b0cb2d2c4bfe93759 100644 (file)
@@ -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