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