glibc/elf/lateglobal.c
Ulrich Drepper b33ed4326d Update.
2004-04-21  Jakub Jelinek  <jakub@redhat.com>

	* posix/tst-chmod.c (do_test): Fix a typo.
	* elf/lateglobal.c (main): Fix error checks.
	Patch by Stephen Clarke <stephen.clarke@st.com>.

	* manual/ctype.texi (isblank, iswblank): Mark as ISO functions,
	mention they have been added in ISO C99.
	Reported by Ben Pfaff <blp@cs.stanford.edu>.

2004-03-31  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/ieee754/ldbl-128/bits/huge_vall.h: Fix typo.
2004-04-21 18:58:31 +00:00

48 lines
854 B
C

#include <dlfcn.h>
#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
int
main (void)
{
void *h[2];
int fail;
int (*fp) (void);
mtrace ();
h[0] = dlopen ("ltglobmod1.so", RTLD_LAZY);
if (h[0] == NULL)
{
printf ("%s: cannot open %s: %s",
__FUNCTION__, "ltglobmod1.so", dlerror ());
exit (EXIT_FAILURE);
}
h[1] = dlopen ("ltglobmod2.so", RTLD_LAZY);
if (h[1] == NULL)
{
printf ("%s: cannot open %s: %s",
__FUNCTION__, "ltglobmod2.so", dlerror ());
exit (EXIT_FAILURE);
}
puts ("loaded \"ltglobmod1.so\" without RTLD_GLOBAL");
fp = dlsym (h[1], "foo");
if (fp == NULL)
{
printf ("cannot get address of `foo': %s", dlerror ());
exit (EXIT_FAILURE);
}
fail = fp ();
puts ("back in main");
dlclose (h[1]);
dlclose (h[0]);
return fail;
}