diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2010-06-04 15:30:40 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2010-06-04 15:30:40 +0000 |
commit | ced5f59df9ba6e869ecd284e568ef5c3be82158f (patch) | |
tree | 1f579fec2d51c1eb48eba2b968c10a2ec51b8f49 /newlib/libc/misc/init.c | |
parent | e4f9551b407ad1a538d039fb4be395aab0c7fa51 (diff) | |
download | cygnal-ced5f59df9ba6e869ecd284e568ef5c3be82158f.tar.gz cygnal-ced5f59df9ba6e869ecd284e568ef5c3be82158f.tar.bz2 cygnal-ced5f59df9ba6e869ecd284e568ef5c3be82158f.zip |
2010-06-04 Mark Mitchell <mark@codesourcery.com>
* libc/stdlib/__call_atexit.c (__libc_fini): Declare.
(register_fini): New function.
* libc/misc/init.c (_fini): Remove.
(__libc_fini_array): Likewise.
* libc/misc/fini.c: New file.
* libc/misc/Makefile.am (LIB_SOURCES): Add fini.c.
* libc/misc/Makefile.in: Regenerate.
Diffstat (limited to 'newlib/libc/misc/init.c')
-rw-r--r-- | newlib/libc/misc/init.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/newlib/libc/misc/init.c b/newlib/libc/misc/init.c index 50bac50c7..c85d6020f 100644 --- a/newlib/libc/misc/init.c +++ b/newlib/libc/misc/init.c @@ -20,11 +20,8 @@ extern void (*__preinit_array_start []) (void) __attribute__((weak)); extern void (*__preinit_array_end []) (void) __attribute__((weak)); extern void (*__init_array_start []) (void) __attribute__((weak)); extern void (*__init_array_end []) (void) __attribute__((weak)); -extern void (*__fini_array_start []) (void) __attribute__((weak)); -extern void (*__fini_array_end []) (void) __attribute__((weak)); extern void _init (void); -extern void _fini (void); /* Iterate over all the init routines. */ void @@ -43,18 +40,4 @@ __libc_init_array (void) for (i = 0; i < count; i++) __init_array_start[i] (); } - -/* Run all the cleanup routines. */ -void -__libc_fini_array (void) -{ - size_t count; - size_t i; - - count = __fini_array_end - __fini_array_start; - for (i = count; i > 0; i--) - __fini_array_start[i-1] (); - - _fini (); -} #endif |