glibc/elf/tst-tls15.c
Ulrich Drepper 167d5acc0d [BZ #786]
2005-03-15  Jakub Jelinek  <jakub@redhat.com>
	[BZ #786]
	* sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Handle
	GL(dl_tls_static_nelem) == GL(dl_tls_max_dtv_idx).
	* elf/Makefile: Add rules to build and run tst-tls15.
	* elf/tst-tls15.c: New test.
	* elf/tst-tlsmod15a.c: New file.
	* elf/tst-tlsmod15b.c: New file.

2005-03-20  Ulrich Drepper  <drepper@redhat.com>

	* elf/rtld.c (dl_main): Always call init_tls if we have audit modules.
2005-03-20 22:25:59 +00:00

33 lines
590 B
C

#include <dlfcn.h>
#include <stdio.h>
static int
do_test (void)
{
void *h = dlopen ("tst-tlsmod15a.so", RTLD_NOW);
if (h != NULL)
{
puts ("unexpectedly succeeded to open tst-tlsmod15a.so");
exit (1);
}
h = dlopen ("tst-tlsmod15b.so", RTLD_NOW);
if (h == NULL)
{
puts ("failed to open tst-tlsmod15b.so");
exit (1);
}
int (*fp) (void) = (int (*) (void)) dlsym (h, "in_dso");
if (fp == NULL)
{
puts ("cannot find in_dso");
exit (1);
}
return fp ();
}
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"