blob: c0950c5879551743139c9a4e3ab76067140ada9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#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");
}
|