3
#include <gnu/lib-names.h>
9
__attribute ((constructor))
19
void *h = dlopen (LIBC_SO, RTLD_LAZY|RTLD_NOLOAD);
22
printf ("cannot get handle for %s: %s\n", LIBC_SO, dlerror ());
27
if (dlinfo (h, RTLD_DI_LMID, &ns) != 0)
29
printf ("dlinfo for %s in %s failed: %s\n",
30
LIBC_SO, __func__, dlerror ());
36
printf ("namespace for %s not LM_ID_BASE\n", LIBC_SO);
42
printf ("dlclose for %s in %s failed: %s\n",
43
LIBC_SO, __func__, dlerror ());
49
puts ("constructor did not run");
54
puts ("constructor did not run exactly once");