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