summary refs log tree commit diff
path: root/dlfcn/tstcxaatexit.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-03-10 06:32:33 +0000
committerUlrich Drepper <drepper@redhat.com>2001-03-10 06:32:33 +0000
commit719404ef2e29b2240da9c63c525a9493f9bf764a (patch)
treed5c5efbb22338d34bf11f14d628cb5b62d5c5483 /dlfcn/tstcxaatexit.c
parent9672b9372f7943f1a8a9d6c32c862459551985eb (diff)
downloadglibc-719404ef2e29b2240da9c63c525a9493f9bf764a.tar.gz
glibc-719404ef2e29b2240da9c63c525a9493f9bf764a.tar.xz
glibc-719404ef2e29b2240da9c63c525a9493f9bf764a.zip
(main): Don't perform the test if __dso_handle is not available.
Diffstat (limited to 'dlfcn/tstcxaatexit.c')
-rw-r--r--dlfcn/tstcxaatexit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dlfcn/tstcxaatexit.c b/dlfcn/tstcxaatexit.c
index 9ae86d0275..b78ba64d36 100644
--- a/dlfcn/tstcxaatexit.c
+++ b/dlfcn/tstcxaatexit.c
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+extern void *__dso_handle __attribute__ ((__weak__));
 
 int
 main (void)
@@ -29,6 +30,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_LAZY);
   if (h == NULL)
     {