Back to index

glibc  2.9
Functions
initfirst.c File Reference
#include <dlfcn.h>
#include <stdio.h>

Go to the source code of this file.

Functions

int main (void)

Function Documentation

int main ( void  )

Definition at line 5 of file initfirst.c.

{
  void *h = dlopen ("firstobj.so", RTLD_LAZY);
  void *f;
  if (! h)
    {
      printf ("cannot find firstobj.so: %s\n", dlerror ());
      return 1;
    }
  f = dlsym (h, "foo");
  if (! f)
    {
      printf ("cannot find symbol foo: %s\n", dlerror ());
      return 2;
    }
  ((void (*) (void)) f) ();
  return 0;
}

Here is the call graph for this function: