NEWS: BZ#18319 was fixed in commit ed159672eb3cd650a32b7e5cb4d5ec1fe0e63802
[glibc.git] / dlfcn / failtestmod.c
blob64dadd53ff8ef109900c68b31d06e2ef066c6fd1
1 #include <dlfcn.h>
2 #include <stdio.h>
5 extern void constr (void) __attribute__ ((__constructor__));
6 void
7 __attribute__ ((__constructor__))
8 constr (void)
10 void *handle;
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 dlsym (handle, "main");
22 puts ("called dlsym() to get main");
24 dlclose (handle);