1#include <dlfcn.h>
2#include <stdio.h>
3#include <stdlib.h>
4
5#include <link.h>
6
7static int
8do_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 (file: modname1, RTLD_LAZY);
15 if (h1 == NULL)
16 {
17 printf (format: "cannot open '%s': %s\n", modname1, dlerror ());
18 result = 1;
19 }
20 void *h2 = dlopen (file: modname2, RTLD_LAZY);
21 if (h2 == NULL)
22 {
23 printf (format: "cannot open '%s': %s\n", modname2, dlerror ());
24 result = 1;
25 }
26
27 if (h1 != NULL)
28 dlclose (handle: h1);
29 if (h2 != NULL)
30 dlclose (handle: h2);
31
32 return result;
33}
34
35
36#include <support/test-driver.c>
37

source code of glibc/elf/tst-tls9.c