Back to index

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

Go to the source code of this file.

Defines

#define TEST_FUNCTION   do_test ()

Functions

static int do_test (void)
static void __attribute__ ((destructor))

Variables

int call_puts

Define Documentation

#define TEST_FUNCTION   do_test ()

Definition at line 37 of file order2.c.


Function Documentation

static void __attribute__ ( (destructor)  ) [static]

Definition at line 41 of file order2.c.

{
  if (call_puts)
    puts ("5");
}

Here is the call graph for this function:

static int do_test ( void  ) [static]

Definition at line 8 of file order2.c.

{
  call_puts = 1;

  void *h1 = dlopen ("$ORIGIN/order2mod1.so", RTLD_LAZY | RTLD_GLOBAL);
  if (h1 == NULL)
    {
      puts ("cannot load order2mod1");
      return 1;
    }
  void *h2 = dlopen ("$ORIGIN/order2mod2.so", RTLD_LAZY);
  if (h2 == NULL)
    {
      puts ("cannot load order2mod2");
      return 1;
    }
  if (dlclose (h1) != 0)
    {
      puts ("dlclose order2mod1 failed");
      return 1;
    }
  if (dlclose (h2) != 0)
    {
      puts ("dlclose order2mod2 failed");
      return 1;
    }
  return 0;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 5 of file order2.c.