This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Fix exception handling for OBJECT_FORMAT_ELF and !HAS_INIT_SECTION port


All

On an internal port I'm working most if not all the EH tests were failing
because we wern't calling __register_frame_info.

The problem is fallout from the 2001-08-03 change by rth which removed the
EH_FRAME_SECTION macro, but this macro is still used by libgcc2.c.

With the attached patch the number of C++ failures dropped from 158 to 26.

ChangeLog

	* libgcc2.c (*): Replace EH_FRAME_SECTION with EH_FRAME_SECTION_NAME.
. 
-----------------------------------------------------------------
Index: libgcc2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/libgcc2.c,v
retrieving revision 1.123
diff -c -p -r1.123 libgcc2.c
*** libgcc2.c   2001/08/12 23:40:51     1.123
--- libgcc2.c   2001/08/14 12:17:06
*************** cacheflush (char *beg, int size, int fla
*** 2741,2747 ****
  /* Some ELF crosses use crtstuff.c to provide __CTOR_LIST__, but use this
     code to run constructors.  In that case, we need to handle EH here, too.  */

! #ifdef EH_FRAME_SECTION
  #include "unwind-dw2-fde.h"
  extern unsigned char __EH_FRAME_BEGIN__[];
  #endif
--- 2741,2747 ----
  /* Some ELF crosses use crtstuff.c to provide __CTOR_LIST__, but use this
     code to run constructors.  In that case, we need to handle EH here, too.  */

! #ifdef EH_FRAME_SECTION_NAME
  #include "unwind-dw2-fde.h"
  extern unsigned char __EH_FRAME_BEGIN__[];
  #endif
*************** __do_global_dtors (void)
*** 2761,2767 ****
        (*(p-1)) ();
      }
  #endif
! #if defined (EH_FRAME_SECTION) && !defined (HAS_INIT_SECTION)
    {
      static int completed = 0;
      if (! completed)
--- 2761,2767 ----
        (*(p-1)) ();
      }
  #endif
! #if defined (EH_FRAME_SECTION_NAME) && !defined (HAS_INIT_SECTION)
    {
      static int completed = 0;
      if (! completed)
*************** __do_global_dtors (void)
*** 2780,2786 ****
  void
  __do_global_ctors (void)
  {
! #ifdef EH_FRAME_SECTION
    {
      static struct object object;
      __register_frame_info (__EH_FRAME_BEGIN__, &object);
--- 2780,2786 ----
  void
  __do_global_ctors (void)
  {
! #ifdef EH_FRAME_SECTION_NAME
    {
      static struct object object;
      __register_frame_info (__EH_FRAME_BEGIN__, &object);
---------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]