8 #define TEST_FUNCTION do_test ()
12 static const char modname
[] = "tst-tlsmod2.so";
16 int (*fp
) (int, int *);
19 h
= dlopen (modname
, RTLD_LAZY
);
22 printf ("cannot open '%s': %s\n", modname
, dlerror ());
26 foop
= dlsym (h
, "foo");
29 printf ("cannot get symbol 'foo': %s\n", dlerror ());
35 fp
= dlsym (h
, "in_dso");
38 printf ("cannot get symbol 'in_dso': %s\n", dlerror ());
42 result
|= fp (42, foop
);
44 foop2
= dlsym (h
, "foo");
47 printf ("cannot get symbol 'foo' the second time: %s\n", dlerror ());
53 puts ("address of 'foo' different the second time");
68 #include "../test-skeleton.c"