1 #include <dlfcn.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4 
5 #include <link.h>
6 
7 static int
do_test(void)8 do_test (void)
9 {
10   static const char modname1[] = "tst-tlsmod5.so";
11   static const char modname2[] = "tst-tlsmod6.so";
12   int result = 0;
13 
14   void *h1 = dlopen (modname1, RTLD_LAZY);
15   if (h1 == NULL)
16     {
17       printf ("cannot open '%s': %s\n", modname1, dlerror ());
18       result = 1;
19     }
20   void *h2 = dlopen (modname2, RTLD_LAZY);
21   if (h2 == NULL)
22     {
23       printf ("cannot open '%s': %s\n", modname2, dlerror ());
24       result = 1;
25     }
26 
27   if (h1 != NULL)
28     dlclose (h1);
29   if (h2 != NULL)
30     dlclose (h2);
31 
32   return result;
33 }
34 
35 
36 #include <support/test-driver.c>
37