blob: c768fb6a5be707f6583fb34192334695bc108726 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#include <dlfcn.h>
2#include <stdio.h>
3
4static int
5do_test (void)
6{
7 void *h = dlopen ("tst-tlsmod17b.so", RTLD_LAZY);
8 if (h == NULL)
9 {
10 puts ("unexpectedly failed to open tst-tlsmod17b.so");
11 exit (1);
12 }
13
14 int (*fp) (void) = (int (*) (void)) dlsym (h, "tlsmod17b");
15 if (fp == NULL)
16 {
17 puts ("cannot find tlsmod17b");
18 exit (1);
19 }
20
21 if (fp ())
22 exit (1);
23
24 return 0;
25}
26
27#define TEST_FUNCTION do_test ()
28#include "../test-skeleton.c"