glibc/elf/nextmod1.c
Ulrich Drepper e6ea9c0dd0 Update.
2000-10-02  Jakub Jelinek  <jakub@redhat.com>

	* elf/nextmod1.c (failing_rtld_next_use): Ensure it is not tail call
	optimized.

	* sysdeps/sparc/sparc32/fpu/libm-test-ulps: New file.
2000-10-03 07:37:02 +00:00

28 lines
478 B
C

#include <dlfcn.h>
int nextmod1_dummy_var;
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)
{
void *ret = dlsym (RTLD_NEXT, __FUNCTION__);
/* Ensure we are not tail call optimized, because then RTLD_NEXT
might return this function. */
++nextmod1_dummy_var;
return ret;
}