9a9b91c940
It's finally done.. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
18 lines
277 B
C
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");
|
|
}
|
|
|