Kernel/LibC: pass environ pointer to process

This commit is contained in:
Bananymous
2023-06-05 20:34:08 +03:00
parent 6b73f4d187
commit 896b919c9d
6 changed files with 14 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ continue_thread:
movq $0, %rax
jmp *%rsi
# void thread_userspace_trampoline(uint64_t rsp, uint64_t rip, int argc, char** argv)
# void thread_userspace_trampoline(uint64_t rsp, uint64_t rip, int argc, char** argv, char** envp)
.global thread_userspace_trampoline
thread_userspace_trampoline:
pushq $0x23
@@ -35,4 +35,5 @@ thread_userspace_trampoline:
pushq %rsi
movq %rdx, %rdi
movq %rcx, %rsi
movq %r8, %rdx
iretq