mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
[libc] Add new libc
This new libc is mostly from scratch, with *printf() functions provided by Marco Paland and Eyal Rozenberg's tiny printf library, and malloc and friends provided by dlmalloc.
This commit is contained in:
17
src/libraries/libc/arch/amd64/crt/crt0.s
Normal file
17
src/libraries/libc/arch/amd64/crt/crt0.s
Normal file
@@ -0,0 +1,17 @@
|
||||
extern main
|
||||
extern exit
|
||||
extern __init_libj6
|
||||
|
||||
global _start:function (_start.end - _start)
|
||||
_start:
|
||||
mov rbp, rsp
|
||||
mov rdi, rsp
|
||||
call __init_libj6
|
||||
|
||||
pop rdi
|
||||
mov rsi, rsp
|
||||
call main
|
||||
|
||||
mov rdi, rax
|
||||
call exit
|
||||
.end:
|
||||
Reference in New Issue
Block a user