1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 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__); }