Kernel/LibC/DynamicLoader: Update process start ABI

We now use SysV abi for process startup
This commit is contained in:
2025-04-15 23:04:20 +03:00
parent e6026cb0b8
commit 36baf7b0af
12 changed files with 314 additions and 280 deletions

View File

@@ -2,18 +2,22 @@
.global _start
_start:
pushl $0
# get argc, argv, envp
movl (%esp), %edi
leal 4(%esp), %esi
leal 4(%esi, %edi, 4), %edx
# align stack
andl $-16, %esp
xorl %ebp, %ebp
# save argc, argv, envp
subl $4, %esp
pushl %edx
pushl %esi
pushl %edi
# STACK LAYOUT
# null
# argc
# argv
# envp
xorl %ebp, %ebp
subl $4, %esp
pushl $__fini_array_end
pushl $__fini_array_start