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