]>
Commit | Line | Data |
---|---|---|
3d91edb2 | 1 | #include <dlfcn.h> |
d3556ac9 | 2 | #include <stdlib.h> |
3d91edb2 | 3 | |
1a511d31 | 4 | #include "testobj.h" |
fe60f764 | 5 | |
482eec0d UD |
6 | int |
7 | obj2func1 (int a __attribute__ ((unused))) | |
8 | { | |
9 | return 43; | |
10 | } | |
11 | ||
12 | int | |
13 | obj2func2 (int a) | |
14 | { | |
15 | return obj1func1 (a) + 10; | |
16 | } | |
3d91edb2 UD |
17 | |
18 | int | |
19 | preload (int a) | |
20 | { | |
21 | int (*fp) (int) = dlsym (RTLD_NEXT, "preload"); | |
22 | if (fp != NULL) | |
23 | return fp (a) + 10; | |
24 | return 10; | |
25 | } |