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