collect2.c (write_c_file_glob): Allocate initial frame object in static storage and...
authorPaul Eggert <eggert@twinsun.com>
Fri, 12 Dec 1997 07:37:57 +0000 (07:37 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 12 Dec 1997 07:37:57 +0000 (00:37 -0700)
        * collect2.c (write_c_file_glob): Allocate initial frame object
        in static storage and pass its address.

From-SVN: r17066

gcc/ChangeLog
gcc/collect2.c

index 8e98717d9202f5b18d349715a420c2484237cae2..983e355f911c094460b9b24b56dd0d6eaff10dc5 100644 (file)
@@ -1,3 +1,8 @@
+1997-12-11  Paul Eggert  <eggert@twinsun.com>
+
+       * collect2.c (write_c_file_glob): Allocate initial frame object
+       in static storage and pass its address.
+
 Thu Dec 11 23:33:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * except.c (call_get_eh_context): Don't take a parm.
index a9baf8475d0e4598e636ec3aed10692be6945391..a79f7a849f9ad95efab848f49a0d62fab55c2c1b 100644 (file)
@@ -1866,11 +1866,22 @@ write_c_file_glob (stream, name)
       write_list (stream, "\t\t&", frame_tables.first);
       fprintf (stream, "\t0\n};\n");
 
-      fprintf (stream, "extern void __register_frame_table (void *);\n");
+      /* This must match what's in frame.h.  */
+      fprintf (stream, "struct object {\n");
+      fprintf (stream, "  void *pc_begin;\n");
+      fprintf (stream, "  void *pc_end;\n");
+      fprintf (stream, "  void *fde_begin;\n");
+      fprintf (stream, "  void *fde_array;\n");
+      fprintf (stream, "  __SIZE_TYPE__ count;\n");
+      fprintf (stream, "  struct object *next;\n");
+      fprintf (stream, "};\n");
+
+      fprintf (stream, "extern void __register_frame_table (void *, struct object *);\n");
       fprintf (stream, "extern void __deregister_frame (void *);\n");
 
       fprintf (stream, "static void reg_frame () {\n");
-      fprintf (stream, "\t__register_frame_table (frame_table);\n");
+      fprintf (stream, "\tstatic struct object ob;\n");
+      fprintf (stream, "\t__register_frame_table (frame_table, &ob);\n");
       fprintf (stream, "\t}\n");
 
       fprintf (stream, "static void dereg_frame () {\n");