summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-06-05 14:33:22 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-06-05 14:33:22 +0000
commit393a861dbd9cc9f243efae043b852bb2e736afd0 (patch)
treee4eebe65528173685095574fea727d6e80b46b93 /cpukit
parent2008-06-05 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-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')
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/libcsupport/src/newlibc_exit.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index ba31daf50b..0992288c24 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,10 @@
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.
+
+2008-06-05 Joel Sherrill <joel.sherrill@OARcorp.com>
+
* itron/include/rtems/itron/task.h, itron/src/task.c: ITRON currently
has no functional data in the user extension data area structure so
this disables the definition, allocation and deallocation of that
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.