From d743ba1e9bf45b532c18ea437476984c0e2f0c44 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Jun 2000 04:31:24 +0000 Subject: Update. 2000-06-09 H.J. Lu * dlfcn/dlerror.c (_dlerror_run): Set result->errstring to NULL after freeing it. * dlfcn/Makefile (distribute): Add failtestmod.c. (tests): Add failtest. Add rules to build and run failtest. * dlfcn/failtest.c: New file. * dlfcn/failtestmod.c: New file. --- dlfcn/failtestmod.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 dlfcn/failtestmod.c (limited to 'dlfcn/failtestmod.c') diff --git a/dlfcn/failtestmod.c b/dlfcn/failtestmod.c new file mode 100644 index 0000000000..595da4d567 --- /dev/null +++ b/dlfcn/failtestmod.c @@ -0,0 +1,25 @@ +#include +#include + + +void +__attribute__ ((__constructor__)) +constr (void) +{ + void *handle; + void *m; + + /* Open the library. */ + handle = dlopen (NULL, RTLD_NOW); + if (handle == NULL) + { + puts ("Cannot get handle to own object"); + return; + } + + /* Get a symbol. */ + m = dlsym (handle, "main"); + puts ("called dlsym() to get main"); + + dlclose (handle); +} -- cgit v1.2.3