]> sourceware.org Git - glibc.git/blame - dlfcn/failtestmod.c
linuxthreads/ChangeLog
[glibc.git] / dlfcn / failtestmod.c
CommitLineData
d743ba1e
UD
1#include <dlfcn.h>
2#include <stdio.h>
3
4
20bb2883 5extern void constr (void) __attribute__ ((__constructor__));
d743ba1e
UD
6void
7__attribute__ ((__constructor__))
8constr (void)
9{
10 void *handle;
11 void *m;
12
13 /* Open the library. */
14 handle = dlopen (NULL, RTLD_NOW);
15 if (handle == NULL)
16 {
17 puts ("Cannot get handle to own object");
18 return;
19 }
20
21 /* Get a symbol. */
22 m = dlsym (handle, "main");
23 puts ("called dlsym() to get main");
24
25 dlclose (handle);
26}
This page took 0.100256 seconds and 5 git commands to generate.