mirror of
https://github.com/justinian/jsix.git
synced 2025-12-11 00:44:31 -08:00
This change adds a new __init_libc function which calls all the global ctors in .init_array, and is called from _start.
20 lines
249 B
ArmAsm
20 lines
249 B
ArmAsm
extern main
|
|
extern exit
|
|
extern __init_libj6
|
|
extern __init_libc
|
|
|
|
global _start:function (_start.end - _start)
|
|
_start:
|
|
mov rbp, rsp
|
|
mov rdi, rsp
|
|
call __init_libj6
|
|
call __init_libc
|
|
|
|
pop rdi
|
|
mov rsi, rsp
|
|
call main
|
|
|
|
mov rdi, rax
|
|
call exit
|
|
.end:
|