lib: c: implement runtime initialisation

This commit is contained in:
2026-03-22 19:11:43 +00:00
parent 7b89a038a2
commit c1e10e8b70
4 changed files with 34 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
#include <mango/log.h>
#include <rosetta/bootstrap.h>
#include <stdio.h>
extern int main(int, const char **, const char **);
void *__attribute__((weak)) pthread_self(void)
{
/* Nothing */
return NULL;
}
int __libc_init(const struct rosetta_bootstrap *bsinfo)
{
(volatile void)pthread_self();
kern_logf("bsinfo = %p", bsinfo);
return 0;
}