]> gcc.gnu.org Git - gcc.git/commitdiff
* libgcc2.c (exit): Do not call __bb_exit_func if HAVE_ATEXIT.
authorPhilippe De Muyter <phdm@macqel.be>
Thu, 19 Mar 1998 20:24:35 +0000 (21:24 +0100)
committerJeff Law <law@gcc.gnu.org>
Thu, 19 Mar 1998 20:24:35 +0000 (13:24 -0700)
From-SVN: r18717

gcc/ChangeLog
gcc/libgcc2.c

index e25b040113ee4b7d9cc7a97e583b4e5a07edf294..d587b1ed1bfa635f455ade3de2cb206521ed61aa 100644 (file)
@@ -1,5 +1,7 @@
 Thu Mar 19 20:30:31 1998  Philippe De Muyter  <phdm@macqel.be>
 
+       * libgcc2.c (exit): Do not call __bb_exit_func if HAVE_ATEXIT.
+
        * fold-const.c (fold): Replace sign-extension of a zero extended
        value by a single zero extension.
 
index 6ccc1187f0ac307875906bb918b6f7de6edf3d29..663609b00fa6f16fed33e387496a0f05a0c3cc7d 100644 (file)
@@ -2984,10 +2984,16 @@ exit (int status)
 #else /* No NEED_ATEXIT */
   __do_global_dtors ();
 #endif /* No NEED_ATEXIT */
-#endif
+#endif /* !defined (INIT_SECTION_ASM_OP) || !defined (OBJECT_FORMAT_ELF) */
+/* In gbl-ctors.h, ON_EXIT is defined if HAVE_ATEXIT is defined.  In
+__bb_init_func and _bb_init_prg, __bb_exit_func is registered with ON_EXIT if
+ON_EXIT is defined.  Thus we must not call __bb_exit_func here anymore if
+HAVE_ATEXIT is defined. */
+#ifndef HAVE_ATEXIT
 #ifndef inhibit_libc
   __bb_exit_func ();
 #endif
+#endif /* !HAVE_ATEXIT */
 #ifdef EXIT_BODY
   EXIT_BODY;
 #else
This page took 0.077447 seconds and 5 git commands to generate.