source: vendor/glibc-tests/glibc/elf/tst-tls9.c

Last change on this file was 2036, checked in by bird, 20 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 750 bytes
Line 
1#include <dlfcn.h>
2#include <stdio.h>
3#include <stdlib.h>
4
5#include <link.h>
6#include <tls.h>
7
8#define TEST_FUNCTION do_test ()
9static int
10do_test (void)
11{
12#ifdef USE_TLS
13 static const char modname1[] = "tst-tlsmod5.so";
14 static const char modname2[] = "tst-tlsmod6.so";
15 int result = 0;
16
17 void *h1 = dlopen (modname1, RTLD_LAZY);
18 if (h1 == NULL)
19 {
20 printf ("cannot open '%s': %s\n", modname1, dlerror ());
21 result = 1;
22 }
23 void *h2 = dlopen (modname2, RTLD_LAZY);
24 if (h2 == NULL)
25 {
26 printf ("cannot open '%s': %s\n", modname2, dlerror ());
27 result = 1;
28 }
29
30 if (h1 != NULL)
31 dlclose (h1);
32 if (h2 != NULL)
33 dlclose (h2);
34
35 return result;
36#else
37 return 0;
38#endif
39}
40
41
42#include "../test-skeleton.c"
Note: See TracBrowser for help on using the repository browser.