diff options
Diffstat (limited to 'elf/dblunload.c')
-rw-r--r-- | elf/dblunload.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/elf/dblunload.c b/elf/dblunload.c deleted file mode 100644 index ab0b2a5e9e..0000000000 --- a/elf/dblunload.c +++ /dev/null @@ -1,53 +0,0 @@ -#include <dlfcn.h> -#include <mcheck.h> -#include <stdio.h> -#include <stdlib.h> - - -int -main (void) -{ - void *p1; - void *p2; - int (*fp) (void); - int result; - - mtrace (); - - p1 = dlopen ("dblloadmod1.so", RTLD_LAZY); - if (p1 == NULL) - { - printf ("cannot load dblloadmod1.so: %s\n", dlerror ()); - exit (EXIT_FAILURE); - } - - p2 = dlopen ("dblloadmod2.so", RTLD_LAZY); - if (p2 == NULL) - { - printf ("cannot load dblloadmod2.so: %s\n", dlerror ()); - exit (EXIT_FAILURE); - } - - if (dlclose (p1) != 0) - { - printf ("error while closing dblloadmod1.so: %s\n", dlerror ()); - exit (EXIT_FAILURE); - } - - fp = dlsym (p2, "xyzzy"); - if (fp == NULL) - { - printf ("cannot get function \"xyzzy\": %s\n", dlerror ()); - exit (EXIT_FAILURE); - } - - result = fp (); - - if (dlclose (p2) != 0) - { - printf ("error while closing dblloadmod2.so: %s\n", dlerror ()); - exit (EXIT_FAILURE); - } - - return result; -} |