[libj6] Update how init args are passed and used

Now the init args are a linked list - this also means ld.so can use its
own plus those of the program (eg, SLP and VFS handles). __init_libj6
now adds the head of the list to its global init_args structure, and the
j6_find_init_handle function can be used to find a handle in those args
for a given proto.

This fixes situations like the logger using the wrong mailbox for the
service locator and never finding the uart driver.
This commit is contained in:
Justin C. Miller
2024-02-20 20:51:14 -08:00
parent 9f8e75f680
commit 4e73e933db
10 changed files with 125 additions and 72 deletions

View File

@@ -18,6 +18,8 @@ global _libc_crt0_start:function (_libc_crt0_start.end - _libc_crt0_start)
_start:
_libc_crt0_start:
mov rdx, [rsp] ; grab args pointer
push 0 ; Add null frame
push 0
mov rbp, rsp