LibC: Make _init and _fini weak symbols

These seem to be missing sometimes when making shared executables
This commit is contained in:
2024-09-11 14:31:26 +03:00
parent a07cbabcb3
commit 4189a1c729
3 changed files with 12 additions and 4 deletions

View File

@@ -20,7 +20,11 @@ _start:
call _init_libc
# call global constructors
call _init
movq $_init, %rax
testq %rax, %rax
jz 1f
call *%rax
1:
movq $__init_array_start, %rbx
jmp 2f