diff options
Diffstat (limited to 'dlfcn/tstatexit.c')
-rw-r--r-- | dlfcn/tstatexit.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dlfcn/tstatexit.c b/dlfcn/tstatexit.c index e3dfe4b..58bc8a0 100644 --- a/dlfcn/tstatexit.c +++ b/dlfcn/tstatexit.c @@ -21,6 +21,8 @@ #include <stdlib.h> +extern void *__dso_handle __attribute__ ((__weak__)); + int main (void) { @@ -29,6 +31,12 @@ main (void) void (*fp) (void *); int v = 0; + if (&__dso_handle == NULL) + { + puts ("__dso_handle not available, cannot perform the test"); + exit (0); + } + h = dlopen (fname, RTLD_NOW); if (h == NULL) { |