Blame elf/tst-tls19.c

Packit 6c4009
// BZ 12453
Packit 6c4009
#include <stdio.h>
Packit 6c4009
#include <dlfcn.h>
Packit 6c4009
Packit 6c4009
Packit 6c4009
static int
Packit 6c4009
do_test (void)
Packit 6c4009
{
Packit 6c4009
  void* dl = dlopen ("tst-tls19mod1.so", RTLD_LAZY | RTLD_GLOBAL);
Packit 6c4009
  if (dl == NULL)
Packit 6c4009
    {
Packit 6c4009
      printf ("Error loading tst-tls19mod1.so: %s\n", dlerror ());
Packit 6c4009
      return 1;
Packit 6c4009
    }
Packit 6c4009
Packit 6c4009
  int (*fn) (void) = dlsym (dl, "foo");
Packit 6c4009
  if (fn == NULL)
Packit 6c4009
    {
Packit 6c4009
      printf("Error obtaining symbol foo\n");
Packit 6c4009
      return 1;
Packit 6c4009
    }
Packit 6c4009
Packit 6c4009
  return fn ();
Packit 6c4009
}
Packit 6c4009
Packit 6c4009
#include <support/test-driver.c>