glibc/dlfcn/failtestmod.c
Ulrich Drepper 20bb288327 Update.
* dlfcn/defaultmod1.c: Add prototypes to avoid warnings.
	* dlfcn/defaultmod2.c: Likewise.
	* dlfcn/dlopen.c: Likewise.
	* dlfcn/dlopenold.c: Likewise.
	* dlfcn/failtestmod.c: Likewise.
	* dlfcn/glreflib1.c: Likewise.
	* dlfcn/glreflib2.c: Likewise.
	* dlfcn/eval.c: Likewise.  Add attributes.

	* ctype/ctype-extn.c: Define isblank and not __isblank.
2000-11-29 00:04:54 +00:00

27 lines
459 B
C

#include <dlfcn.h>
#include <stdio.h>
extern void constr (void) __attribute__ ((__constructor__));
void
__attribute__ ((__constructor__))
constr (void)
{
void *handle;
void *m;
/* Open the library. */
handle = dlopen (NULL, RTLD_NOW);
if (handle == NULL)
{
puts ("Cannot get handle to own object");
return;
}
/* Get a symbol. */
m = dlsym (handle, "main");
puts ("called dlsym() to get main");
dlclose (handle);
}