aboutsummaryrefslogtreecommitdiff
path: root/stdlib/atexit.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/atexit.c')
-rw-r--r--stdlib/atexit.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/stdlib/atexit.c b/stdlib/atexit.c
index f28b6ba..aaecb4a 100644
--- a/stdlib/atexit.c
+++ b/stdlib/atexit.c
@@ -33,13 +33,9 @@
<http://www.gnu.org/licenses/>. */
#include <stdlib.h>
+#include <dso_handle.h>
#include "exit.h"
-
-/* This is defined by newer gcc version unique for each module. */
-extern void *__dso_handle __attribute__ ((__weak__));
-
-
/* Register FUNC to be executed by `exit'. */
int
#ifndef atexit
@@ -47,6 +43,5 @@ attribute_hidden
#endif
atexit (void (*func) (void))
{
- return __cxa_atexit ((void (*) (void *)) func, NULL,
- &__dso_handle == NULL ? NULL : __dso_handle);
+ return __cxa_atexit ((void (*) (void *)) func, NULL, __dso_handle);
}