Updated to fedora-glibc-20090416T1610
[glibc/history.git] / elf / initfirst.c
blob5ca83d21bc4da0c5b58c91238f7b342b71dac827
1 #include <dlfcn.h>
2 #include <stdio.h>
4 int
5 main (void)
7 void *h = dlopen ("firstobj.so", RTLD_LAZY);
8 void *f;
9 if (! h)
11 printf ("cannot find firstobj.so: %s\n", dlerror ());
12 return 1;
14 f = dlsym (h, "foo");
15 if (! f)
17 printf ("cannot find symbol foo: %s\n", dlerror ());
18 return 2;
20 ((void (*) (void)) f) ();
21 return 0;