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