* sysdeps/m68k/dl-machine.h (_dl_start_user): Pass correct
[glibc.git] / elf / nextmod1.c
blob19f972b9e029fc715744bf20e6eff2ad36502c2d
1 #include <dlfcn.h>
3 int nextmod1_dummy_var;
5 int
6 successful_rtld_next_test (void)
8 int (*fp) (void);
10 /* Get the next function... */
11 fp = (int (*) (void)) dlsym (RTLD_NEXT, __FUNCTION__);
13 /* ...and simply call it. */
14 return fp ();
18 void *
19 failing_rtld_next_use (void)
21 void *ret = dlsym (RTLD_NEXT, __FUNCTION__);
23 /* Ensure we are not tail call optimized, because then RTLD_NEXT
24 might return this function. */
25 ++nextmod1_dummy_var;
26 return ret;