Back to index

glibc  2.9
Defines | Functions
tst-align.c File Reference
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include "../test-skeleton.c"

Go to the source code of this file.


#define TEST_FUNCTION   do_test ()


static int do_test (void)

Define Documentation

#define TEST_FUNCTION   do_test ()

Definition at line 53 of file tst-align.c.

Function Documentation

static int do_test ( void  ) [static]

Definition at line 25 of file tst-align.c.

  static const char modname[] = "";
  int result = 0;
  void (*fp) (int *);
  void *h;

  h = dlopen (modname, RTLD_LAZY);
  if (h == NULL)
      printf ("cannot open '%s': %s\n", modname, dlerror ());
      exit (1);

  fp = dlsym (h, "in_dso");
  if (fp == NULL)
      printf ("cannot get symbol 'in_dso': %s\n", dlerror ());
      exit (1);

  fp (&result);

  dlclose (h);

  return result;

Here is the call graph for this function: