collect2.c (write_c_file_glob): Allocate initial frame object in static storage and pass its address.

* collect2.c (write_c_file_glob): Allocate initial frame object
        in static storage and pass its address.

From-SVN: r17066
This commit is contained in:
Paul Eggert 1997-12-12 07:37:57 +00:00 committed by Jeff Law
parent 01eb7f9a1c
commit 5a5ab947b8
2 changed files with 18 additions and 2 deletions

View 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.

View 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");