crtstuff.c (__frame_dummy): New function for irix6.
authorJim Wilson <wilson@cygnus.com>
Fri, 2 Jan 1998 22:50:23 +0000 (22:50 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 2 Jan 1998 22:50:23 +0000 (15:50 -0700)
        * crtstuff.c (__frame_dummy): New function for irix6.
        (__do_global_ctors): Call __frame_dummy for irix6.
        * iris6.h (LINK_SPEC): Hide __frame_dummy too.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r17281

gcc/ChangeLog
gcc/config/mips/iris6.h
gcc/crtstuff.c

index 95b745632c999803f67b9399ff9aa9296f30e178..9c3be2f88cceb8b75589155714faf1c65ad19766 100644 (file)
@@ -1,3 +1,10 @@
+Fri Jan  2 23:40:09 1998  Jim Wilson  (wilson@cygnus.com)
+                          Jeffrey A Law  (law@cygnus.com)
+
+        * crtstuff.c (__frame_dummy): New function for irix6.
+        (__do_global_ctors): Call __frame_dummy for irix6.
+       * iris6.h (LINK_SPEC): Hide __frame_dummy too.
+
 Fri Jan  2 04:57:57 1998  Weiwen Liu  <liu@hepmail.physics.yale.edu>
 
        * alpha.c (vms_valid_decl_attribute_p): Move within #if OPEN_VMS.
index 5bc733cb42762ff76770bce2754541441ec8c4ae..0d88750f7b891b2545e7e7d261af629163c7b611 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  Iris version 6.
-   Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -541,5 +541,5 @@ do {                                                                         \
 %{!static: \
   %{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}}} \
 %{rpath} -init __do_global_ctors -fini __do_global_dtors \
-%{shared:-hidden_symbol __do_global_ctors,__do_global_dtors,__EH_FRAME_BEGIN__} \
+%{shared:-hidden_symbol __do_global_ctors,__do_global_dtors,__EH_FRAME_BEGIN__,__frame_dummy} \
 -_SYSTYPE_SVR4 %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64} %{!mabi*: -n32}"
index 3f3643f6b8de7897c3d3fca94d117d5ab1b652fc..d296ea9084b320e188eb13fe3095d48b58533d74 100644 (file)
@@ -1,6 +1,6 @@
 /* Specialized bits of code needed to support construction and
    destruction of file-scope objects in C++ code.
-   Copyright (C) 1991, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1991, 94-97, 1998 Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@monkeys.com).
 
 This file is part of GNU CC.
@@ -257,6 +257,18 @@ __do_global_dtors ()
   __deregister_frame_info (__EH_FRAME_BEGIN__);
 #endif
 }
+
+#ifdef EH_FRAME_SECTION_ASM_OP
+/* Define a function here to call __register_frame.  crtend.o is linked in
+   after libgcc.a, and hence can't call libgcc.a functions directly.  That
+   can lead to unresolved function references.  */
+void
+__frame_dummy ()
+{
+  static struct object object;
+  __register_frame_info (__EH_FRAME_BEGIN__, &object);
+}
+#endif
 #endif
 
 #endif /* defined(INIT_SECTION_ASM_OP) */
@@ -387,15 +399,13 @@ __do_global_ctors_aux ()  /* prologue goes in .text section */
 /* This case is used by the Irix 6 port, which supports named sections but
    not an SVR4-style .init section.  __do_global_ctors can be non-static
    in this case because we protect it with -hidden_symbol.  */
-extern char __EH_FRAME_BEGIN__[];
 static func_ptr __CTOR_END__[];
 void
 __do_global_ctors ()
 {
   func_ptr *p;
 #ifdef EH_FRAME_SECTION_ASM_OP
-  static struct object object;
-  __register_frame_info (__EH_FRAME_BEGIN__, &object);
+  __frame_dummy ();
 #endif
   for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
     (*p) ();