11 static const char modname
[] = "tst-tlsmod3.so";
18 for (i
= 0; i
< 10; ++i
)
20 h
= dlopen (modname
, RTLD_LAZY
);
23 printf ("cannot open '%s': %s\n", modname
, dlerror ());
27 /* Dirty test code here: we peek into a private data structure.
28 We make sure that the module gets assigned the same ID every
29 time. The value of the first round is used. */
31 modid
= ((struct link_map
*) h
)->l_tls_modid
;
32 else if (((struct link_map
*) h
)->l_tls_modid
!= (size_t) modid
)
34 printf ("round %d: modid now %zu, initially %d\n",
35 i
, ((struct link_map
*) h
)->l_tls_modid
, modid
);
39 fp
= dlsym (h
, "in_dso2");
42 printf ("cannot get symbol 'in_dso2': %s\n", dlerror ());
55 #include <support/test-driver.c>