diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-06-05 14:33:22 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-06-05 14:33:22 +0000 |
commit | 393a861dbd9cc9f243efae043b852bb2e736afd0 (patch) | |
tree | e4eebe65528173685095574fea727d6e80b46b93 /cpukit/libcsupport/src/newlibc_exit.c | |
parent | 2008-06-05 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-393a861dbd9cc9f243efae043b852bb2e736afd0.tar.bz2 |
2008-06-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/src/newlibc_exit.c: Only run the fini section on exit if
the target toolset uses init/fini sections.
Diffstat (limited to 'cpukit/libcsupport/src/newlibc_exit.c')
-rw-r--r-- | cpukit/libcsupport/src/newlibc_exit.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/newlibc_exit.c b/cpukit/libcsupport/src/newlibc_exit.c index 735f5752d1..06fdab5cfa 100644 --- a/cpukit/libcsupport/src/newlibc_exit.c +++ b/cpukit/libcsupport/src/newlibc_exit.c @@ -127,8 +127,14 @@ void libc_wrapup(void) void EXIT_SYMBOL(int status) { - extern void _fini( void ); - _fini(); + /* + * If the toolset uses init/fini sections, then we need to + * run the global destructors now. + */ + #if defined(__USE_INIT_FINI__) + extern void _fini( void ); + _fini(); + #endif /* * We need to do the exit processing on the global reentrancy structure. |