user: implement mlibc as the libc, finally.
It's finally done.. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
int fooDone = 0;
|
||||
|
||||
// DSOs do not support pre-initialization functions.
|
||||
|
||||
__attribute__((constructor))
|
||||
void fooInit() {
|
||||
dprintf(1, "initialization function called in foo\n");
|
||||
|
||||
assert(fooDone == 0);
|
||||
fooDone++;
|
||||
}
|
||||
|
||||
int isFooDone() {
|
||||
return fooDone;
|
||||
}
|
||||
Reference in New Issue
Block a user