Files
KirkOS/user/include/mlibc/tests/rtld/rtld_next/libbar.c
T
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

17 lines
276 B
C

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