summaryrefslogtreecommitdiff
path: root/libc/stdlib/_atexit.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-14 01:02:26 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-14 01:02:26 +0000
commit2525195d77d4ab4be720a077d1e30c6a3d8d7a84 (patch)
tree2b0a36008e182161474cf6ee35b4992181e23ef2 /libc/stdlib/_atexit.c
parent7f7444e68d69f90fd36bfc8488de7b183d998236 (diff)
after much deliberation, may i present Joseph S. Myers patch to add support for .init and .fini array processing
for the gory details, see the mailing list: http://www.uclibc.org/lists/uclibc/2006-January/014079.html http://www.uclibc.org/lists/uclibc/2006-February/014285.html
Diffstat (limited to 'libc/stdlib/_atexit.c')
-rw-r--r--libc/stdlib/_atexit.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libc/stdlib/_atexit.c b/libc/stdlib/_atexit.c
index 959d08edb..bf35ab2d6 100644
--- a/libc/stdlib/_atexit.c
+++ b/libc/stdlib/_atexit.c
@@ -318,11 +318,8 @@ pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
libc_hidden_data_def(mylock)
#endif
-#ifdef __UCLIBC_CTOR_DTOR__
-extern void (*__app_fini)(void);
-#endif
-
-extern void (*__rtld_fini)(void);
+extern void __uClibc_fini(void);
+libc_hidden_proto(__uClibc_fini)
/*
* Normal program termination
@@ -336,12 +333,7 @@ void exit(int rv)
}
UNLOCK;
-#ifdef __UCLIBC_CTOR_DTOR__
- if (__app_fini != NULL)
- (__app_fini)();
-#endif
- if (__rtld_fini != NULL)
- (__rtld_fini)();
+ __uClibc_fini();
/* If we are using stdio, try to shut it down. At the very least,
* this will attempt to commit all buffered writes. It may also