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.
This commit is contained in:
Joel Sherrill
2008-06-05 14:33:22 +00:00
parent d9857c8a8c
commit 393a861dbd
2 changed files with 13 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
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

View File

@@ -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.