8 #define TEST_FUNCTION do_test ()
13 static const char modname
[] = "tst-tlsmod2.so";
17 int (*fp
) (int, int *);
20 h
= dlopen (modname
, RTLD_LAZY
);
23 printf ("cannot open '%s': %s\n", modname
, dlerror ());
27 foop
= dlsym (h
, "foo");
30 printf ("cannot get symbol 'foo': %s\n", dlerror ());
36 fp
= dlsym (h
, "in_dso");
39 printf ("cannot get symbol 'in_dso': %s\n", dlerror ());
43 result
|= fp (42, foop
);
45 foop2
= dlsym (h
, "foo");
48 printf ("cannot get symbol 'foo' the second time: %s\n", dlerror ());
54 puts ("address of 'foo' different the second time");
72 #include "../test-skeleton.c"