Implement process clone trampoline
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m10s

This commit is contained in:
2026-03-07 20:20:29 +01:00
parent bf99bedfc5
commit ab8856cf4b
9 changed files with 68 additions and 12 deletions

1
libprocess/amd64/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.o

View File

@@ -0,0 +1,7 @@
.global _clone_tramp
_clone_tramp:
xorq %rbp, %rbp
movq %rsp, %rbp
andq $-16, %rsp
callq _clone_tramp1

View File

@@ -0,0 +1,12 @@
#include <liballoc.h>
#include <process.h>
#include <system.h>
void _clone_tramp1 (void) {
struct process_data* pdata = argument_ptr ();
pdata->fn (pdata->arg_ptr);
free (pdata);
quit ();
}

6
libprocess/amd64/src.mk Normal file
View File

@@ -0,0 +1,6 @@
c += amd64/clone_tramp1.c
S += amd64/clone_tramp.S
o += amd64/clone_tramp.o \
amd64/clone_tramp1.o