trivial: add auxv and envp accessors Signed-off-by: Curtis Millar <curtis@curtism.me>
diff --git a/include/sel4runtime.h b/include/sel4runtime.h index 05ab119..9ff1f2e 100644 --- a/include/sel4runtime.h +++ b/include/sel4runtime.h
@@ -18,6 +18,7 @@ #include <stdint.h> #include <sel4/sel4.h> #include <sel4runtime/thread.h> +#include <sel4runtime/auxv.h> #pragma once @@ -39,6 +40,16 @@ int sel4runtime_argc(void); /* + * Get the list of environment variables passed to main. + */ +char const *const *sel4runtime_envp(void); + +/* + * Get the list of auxiliary vectors. + */ +auxv_t const *sel4runtime_auxv(void); + +/* * Get the address of the TLS base register. */ static inline uintptr_t sel4runtime_get_tls_base(void);
diff --git a/src/env.c b/src/env.c index f40087c..446381f 100644 --- a/src/env.c +++ b/src/env.c
@@ -130,6 +130,16 @@ return env.argc; } +char const *const *sel4runtime_envp(void) +{ + return env.envp; +} + +auxv_t const *sel4runtime_auxv(void) +{ + return env.auxv; +} + seL4_BootInfo *sel4runtime_bootinfo(void) { return env.bootinfo;