about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
Diffstat (limited to 'malloc')
-rw-r--r--malloc/mtrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index 6c362d9679..9eb2f5f1c7 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -34,6 +34,7 @@
 #include <_itoa.h>
 
 #include <libc-internal.h>
+#include <dso_handle.h>
 
 #include <libio/iolibio.h>
 #define setvbuf(s, b, f, l) _IO_setvbuf (s, b, f, l)
@@ -315,10 +316,9 @@ mtrace (void)
 #ifdef _LIBC
           if (!added_atexit_handler)
             {
-              extern void *__dso_handle __attribute__ ((__weak__));
               added_atexit_handler = 1;
               __cxa_atexit ((void (*)(void *))release_libc_mem, NULL,
-                            &__dso_handle ? __dso_handle : NULL);
+			    __dso_handle);
             }
 #endif
         }