diff options
Diffstat (limited to 'elf/testobj1.c')
-rw-r--r-- | elf/testobj1.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/elf/testobj1.c b/elf/testobj1.c index 9f64d67..b88a8d0 100644 --- a/elf/testobj1.c +++ b/elf/testobj1.c @@ -1,3 +1,5 @@ +#include <dlfcn.h> + int obj1func1 (int a __attribute__ ((unused))) { @@ -9,3 +11,12 @@ obj1func2 (int a) { return foo (a) + 10; } + +int +preload (int a) +{ + int (*fp) (int) = dlsym (RTLD_NEXT, "preload"); + if (fp != NULL) + return fp (a) + 10; + return 10; +} |