BuildSystem: Move all userpace libraries under the userspace directory
As the number of libraries is increasing, root directory starts to expand. This adds better organization for libraries
This commit is contained in:
34
userspace/libraries/LibC/arch/i686/crt0.S
Normal file
34
userspace/libraries/LibC/arch/i686/crt0.S
Normal file
@@ -0,0 +1,34 @@
|
||||
.section .text
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
pushl $0
|
||||
pushl %edi
|
||||
pushl %esi
|
||||
pushl %edx
|
||||
|
||||
# STACK LAYOUT
|
||||
# null
|
||||
# argc
|
||||
# argv
|
||||
# envp
|
||||
|
||||
xorl %ebp, %ebp
|
||||
|
||||
# init libc (envp already as argument)
|
||||
call _init_libc
|
||||
|
||||
# call global constructors
|
||||
call _init
|
||||
|
||||
# call main
|
||||
movl 0(%esp), %eax
|
||||
xchgl %eax, 8(%esp)
|
||||
movl %eax, (%esp)
|
||||
call main
|
||||
|
||||
subl $12, %esp
|
||||
pushl %eax
|
||||
call exit
|
||||
|
||||
.size _start, . - _start
|
||||
Reference in New Issue
Block a user