diff options
Diffstat (limited to 'elf/nextmod1.c')
-rw-r--r-- | elf/nextmod1.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/elf/nextmod1.c b/elf/nextmod1.c new file mode 100644 index 0000000000..3549c75174 --- /dev/null +++ b/elf/nextmod1.c @@ -0,0 +1,20 @@ +#include <dlfcn.h> + +int +successful_rtld_next_test (void) +{ + int (*fp) (void); + + /* Get the next function... */ + fp = (int (*) (void)) dlsym (RTLD_NEXT, __FUNCTION__); + + /* ...and simply call it. */ + return fp (); +} + + +void * +failing_rtld_next_use (void) +{ + return dlsym (RTLD_NEXT, __FUNCTION__); +} |