From 2525195d77d4ab4be720a077d1e30c6a3d8d7a84 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 14 Feb 2006 01:02:26 +0000 Subject: 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 --- libc/stdlib/_atexit.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'libc/stdlib') 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 -- cgit v1.2.3