Patch installed to allow SunOS4 bootstrap (atexit, on_exit, etc)
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Thu Sep 30 23:58:00 GMT 1999
> From: Jason Merrill <jason@cygnus.com>
>
> >>>>> Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
>
> > One question I have is the instances of calls to ON_EXIT in crtstuff.c
> > in function __do_global_ctors_aux() (which appears more than once.)
>
> > Shouldn't these now be calls to atexit() instead of ON_EXIT?
>
> Yes, thanks.
> Jason
Okay, installed:
Index: ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/ChangeLog,v
retrieving revision 1.4452
diff -u -p -r1.4452 ChangeLog
--- ChangeLog 1999/09/20 17:12:00 1.4452
+++ ChangeLog 1999/09/20 18:58:06
@@ -1,3 +1,8 @@
+Mon Sep 20 14:56:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * crtstuff.c (ON_EXIT): Delete empty macro definition.
+ (__do_global_ctors_aux): Call atexit(), not ON_EXIT().
+
Mon Sep 20 15:25:35 1999 Nick Clifton <nickc@cygnus.com>
* c-decl.c (c_decode_option): Extend comment.
Index: crtstuff.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/crtstuff.c,v
retrieving revision 1.19
diff -u -p -r1.19 crtstuff.c
--- crtstuff.c 1999/09/09 21:36:19 1.19
+++ crtstuff.c 1999/09/20 18:58:07
@@ -119,9 +119,6 @@ typedef void (*func_ptr) (void);
#include "gbl-ctors.h"
-#ifndef ON_EXIT
-#define ON_EXIT(a, b)
-#endif
#define STATIC
#endif /* OBJECT_FORMAT_ELF */
@@ -262,7 +259,7 @@ __do_global_ctors_aux (void) /* prologue
#endif
asm (TEXT_SECTION_ASM_OP); /* don't put epilogue and body in .init */
DO_GLOBAL_CTORS_BODY;
- ON_EXIT (__do_global_dtors, 0);
+ atexit (__do_global_dtors);
}
#endif /* OBJECT_FORMAT_ELF */
@@ -421,7 +418,7 @@ __do_global_ctors_aux (void) /* prologue
{
asm (INIT_SECTION_ASM_OP);
DO_GLOBAL_CTORS_BODY;
- ON_EXIT (__do_global_dtors, 0);
+ atexit (__do_global_dtors);
} /* epilogue and body go in .init section */
#ifdef FORCE_INIT_SECTION_ALIGN
More information about the Gcc-patches
mailing list