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,17 @@
|
||||
#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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user