blob: acbc1d6964902501e7fe0b798c2cf910fdfbf569 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001// BZ 12453
2#include <stdio.h>
3#include <dlfcn.h>
4
5
6static int
7do_test (void)
8{
9 void* dl = dlopen ("tst-tls19mod1.so", RTLD_LAZY | RTLD_GLOBAL);
10 if (dl == NULL)
11 {
12 printf ("Error loading tst-tls19mod1.so: %s\n", dlerror ());
13 return 1;
14 }
15
16 int (*fn) (void) = dlsym (dl, "foo");
17 if (fn == NULL)
18 {
19 printf("Error obtaining symbol foo\n");
20 return 1;
21 }
22
23 return fn ();
24}
25
26#define TEST_FUNCTION do_test ()
27#include "../test-skeleton.c"