diff options
Diffstat (limited to 'test/dlopen/testscope.c')
-rw-r--r-- | test/dlopen/testscope.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/test/dlopen/testscope.c b/test/dlopen/testscope.c deleted file mode 100644 index 90e079885..000000000 --- a/test/dlopen/testscope.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <dlfcn.h> -#include <stdio.h> -#include <stdlib.h> - -#define LIBNAME "libA.so" -int main(int argc, char **argv) -{ - void *libA; - void (*libAfn)(void); - char *error; - - libA = dlopen(LIBNAME, RTLD_LAZY); - if (!libA) { - fprintf(stderr, "Could not open ./%s: %s\n", LIBNAME, dlerror()); - exit(1); - } - - libAfn = dlsym(libA, "libA_func"); - if ((error = dlerror()) != NULL) { - fprintf(stderr, "Could not locate symbol 'libA_func': %s\n", error); - exit(1); - } - - libAfn(); - - dlclose(libA); - - return EXIT_SUCCESS; -} |