1#include <dlfcn.h>
2#include <stdlib.h>
3#include <stdio.h>
4
5static int
6do_test (void)
7{
8 void *h = dlopen (file: "tst-tlsmod17b.so", RTLD_LAZY);
9 if (h == NULL)
10 {
11 puts (s: "unexpectedly failed to open tst-tlsmod17b.so");
12 exit (status: 1);
13 }
14
15 int (*fp) (void) = (int (*) (void)) dlsym (handle: h, name: "tlsmod17b");
16 if (fp == NULL)
17 {
18 puts (s: "cannot find tlsmod17b");
19 exit (status: 1);
20 }
21
22 if (fp ())
23 exit (status: 1);
24
25 return 0;
26}
27
28#include <support/test-driver.c>
29

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