- The destructor function invocation code no longer calls

setjmp(). This is now done within stdlib_main.c prior to
  calling the destructor function invocation code.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14883 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-03-11 16:04:51 +00:00
parent f289140266
commit 419172fb0e
4 changed files with 18 additions and 35 deletions
+1 -13
View File
@@ -1,5 +1,5 @@
/*
* $Id: crtbegin.c,v 1.8 2005-03-10 13:30:11 obarthel Exp $
* $Id: crtbegin.c,v 1.9 2005-03-11 16:04:50 obarthel Exp $
*
* :ts=4
*
@@ -14,11 +14,6 @@
/****************************************************************************/
#include <stdlib.h>
#include <setjmp.h>
/****************************************************************************/
/*
* Dummy constructor and destructor array. The linker script will put these at the
* very beginning of section ".ctors" and ".dtors". crtend.o contains a similar entry
@@ -48,16 +43,9 @@ _init(void)
void
_fini(void)
{
extern jmp_buf __exit_jmp_buf;
int num_dtors,i;
static int j;
/* If one of the destructors drops into
exit(), processing will continue with
the next following destructor. */
(void)setjmp(__exit_jmp_buf);
for(i = 1, num_dtors = 0 ; __DTOR_LIST__[i] != NULL ; i++)
num_dtors++;