6 #define TEST_FUNCTION do_test ()
10 static const char modname
[] = "tst-tlsmod2.so";
14 int (*fp
) (int, int *);
17 h
= dlopen (modname
, RTLD_LAZY
);
20 printf ("cannot open '%s': %s\n", modname
, dlerror ());
24 foop
= dlsym (h
, "foo");
27 printf ("cannot get symbol 'foo': %s\n", dlerror ());
33 fp
= dlsym (h
, "in_dso");
36 printf ("cannot get symbol 'in_dso': %s\n", dlerror ());
40 result
|= fp (42, foop
);
42 foop2
= dlsym (h
, "foo");
45 printf ("cannot get symbol 'foo' the second time: %s\n", dlerror ());
51 puts ("address of 'foo' different the second time");
66 #include "../test-skeleton.c"