mirror of
https://github.com/Fennix-Project/Userspace.git
synced 2025-07-11 07:09:22 +00:00
Updated libc
This commit is contained in:
23
libc/runtime/crt0.S
Normal file
23
libc/runtime/crt0.S
Normal file
@ -0,0 +1,23 @@
|
||||
# https://wiki.osdev.org/Creating_a_C_Library
|
||||
.section .text
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
movq $0, %rbp
|
||||
pushq %rbp
|
||||
pushq %rbp
|
||||
movq %rsp, %rbp
|
||||
|
||||
pushq %rsi
|
||||
pushq %rdi
|
||||
|
||||
call __libc_init
|
||||
call _init
|
||||
|
||||
popq %rdi
|
||||
popq %rsi
|
||||
|
||||
call main
|
||||
movl %eax, %edi
|
||||
call _exit
|
||||
.size _start, . - _start
|
Reference in New Issue
Block a user