Kernel/LibC/DynamicLoader: Update process start ABI
We now use SysV abi for process startup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user