Back to index

glibc  2.9
Functions
unload.c File Reference
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <gnu/lib-names.h>

Go to the source code of this file.

Functions

int main (void)

Function Documentation

int main ( void  )

Definition at line 26 of file unload.c.

{
  void *p = dlopen (PREFIX LIBPTHREAD_SO, RTLD_LAZY);

  if (p == NULL)
    {
      printf ("failed to load %s: %s\n", LIBPTHREAD_SO, dlerror ());
      exit (1);
    }

  if (dlclose (p) != 0)
    {
      printf ("dlclose (%s) failed: %s\n", LIBPTHREAD_SO, dlerror ());
      exit (1);
    }

  puts ("seems to work");

  exit (0);
}

Here is the call graph for this function: