Update.
[glibc.git] / dlfcn / failtestmod.c
blob595da4d567834c8e1ab90be9326d42d1181bf9b6
1 #include <dlfcn.h>
2 #include <stdio.h>
5 void
6 __attribute__ ((__constructor__))
7 constr (void)
9 void *handle;
10 void *m;
12 /* Open the library. */
13 handle = dlopen (NULL, RTLD_NOW);
14 if (handle == NULL)
16 puts ("Cannot get handle to own object");
17 return;
20 /* Get a symbol. */
21 m = dlsym (handle, "main");
22 puts ("called dlsym() to get main");
24 dlclose (handle);