Back to index

glibc  2.9
tst-tls17.c
Go to the documentation of this file.
00001 #include <dlfcn.h>
00002 #include <stdio.h>
00003 
00004 static int
00005 do_test (void)
00006 {
00007   void *h = dlopen ("tst-tlsmod17b.so", RTLD_LAZY);
00008   if (h == NULL)
00009     {
00010       puts ("unexpectedly failed to open tst-tlsmod17b.so");
00011       exit (1);
00012     }
00013 
00014   int (*fp) (void) = (int (*) (void)) dlsym (h, "tlsmod17b");
00015   if (fp == NULL)
00016     {
00017       puts ("cannot find tlsmod17b");
00018       exit (1);
00019     }
00020 
00021   if (fp ())
00022     exit (1);
00023 
00024   return 0;
00025 }
00026 
00027 #define TEST_FUNCTION do_test ()
00028 #include "../test-skeleton.c"