Files
kaguya 9a9b91c940 user: implement mlibc as the libc, finally.
It's finally done..

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-05-02 03:31:49 -04:00

18 lines
277 B
C

#include <dlfcn.h>
typedef char *charFn(void);
__attribute__((weak))
char *definedInBoth() {
return "foo";
}
charFn *fooGetDefault() {
return (charFn *)dlsym(RTLD_DEFAULT, "definedInBoth");
}
charFn *fooGetNext() {
return (charFn *)dlsym(RTLD_NEXT, "definedInBoth");
}