mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[build] Address symbol visibility and DSO builds
Added an `API` macro in `j6/api.h` that expands to mark the given declaration as a default-visible symbol. Also change `format` and `vformat` to non-template functions, and make calls to `main`, `exit`, and the library init functions in `_start` GOT-relative.
This commit is contained in:
@@ -12,17 +12,17 @@ _libc_crt0_start:
|
||||
push 0
|
||||
mov rbp, rsp
|
||||
|
||||
call __init_libj6
|
||||
call __init_libj6 wrt ..got
|
||||
mov rbx, rax
|
||||
|
||||
call __init_libc
|
||||
call __init_libc wrt ..got
|
||||
|
||||
mov rdi, 0
|
||||
mov rsi, rsp
|
||||
mov rdx, 0 ; TODO: actually parse stack for argc, argv, envp
|
||||
mov rcx, rbx
|
||||
call main
|
||||
call main wrt ..got
|
||||
|
||||
mov rdi, rax
|
||||
call exit
|
||||
call exit wrt ..got
|
||||
.end:
|
||||
|
||||
Reference in New Issue
Block a user