[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:
@@ -75,7 +75,7 @@ main(int argc, const char **argv, const char **env)
|
||||
return s;
|
||||
|
||||
const j6_init_args *initp = j6_get_init_args();
|
||||
uintptr_t modules_addr = initp->args[0];
|
||||
uintptr_t modules_addr = initp->argv[0];
|
||||
|
||||
std::vector<const module*> mods;
|
||||
load_modules(modules_addr, sys, 0, mods);
|
||||
|
||||
Reference in New Issue
Block a user