mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
[libc] Call global ctors in user code
This change adds a new __init_libc function which calls all the global ctors in .init_array, and is called from _start.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
extern main
|
||||
extern exit
|
||||
extern __init_libj6
|
||||
extern __init_libc
|
||||
extern _arg_modules_phys
|
||||
|
||||
section .bss
|
||||
@@ -28,6 +29,7 @@ _start:
|
||||
mov rbp, rsp
|
||||
mov rdi, rsp
|
||||
call __init_libj6
|
||||
call __init_libc
|
||||
|
||||
pop rdi
|
||||
mov rsi, rsp
|
||||
|
||||
Reference in New Issue
Block a user