8 #define TEST_FUNCTION do_test ()
12 static const char modname
[] = "tst-tlsmod3.so";
19 for (i
= 0; i
< 10; ++i
)
21 h
= dlopen (modname
, RTLD_LAZY
);
24 printf ("cannot open '%s': %s\n", modname
, dlerror ());
28 /* Dirty test code here: we peek into a private data structure.
29 We make sure that the module gets assigned the same ID every
30 time. The value of the first round is used. */
32 modid
= ((struct link_map
*) h
)->l_tls_modid
;
33 else if (((struct link_map
*) h
)->l_tls_modid
!= (size_t) modid
)
35 printf ("round %d: modid now %zu, initially %d\n",
36 i
, ((struct link_map
*) h
)->l_tls_modid
, modid
);
40 fp
= dlsym (h
, "in_dso2");
43 printf ("cannot get symbol 'in_dso2': %s\n", dlerror ());
56 #include "../test-skeleton.c"