]> gcc.gnu.org Git - gcc.git/commitdiff
collect2.c (main): If we have frames, then we will need to import the frame handling...
authorGeoff Keating <geoffk@cygnus.com>
Mon, 14 Feb 2000 19:46:02 +0000 (19:46 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Mon, 14 Feb 2000 19:46:02 +0000 (19:46 +0000)
* collect2.c (main) [COLLECT_EXPORT_LIST]: If we have frames,
then we will need to import the frame handling functions.
(scan_prog_file) [COLLECT_EXPORT_LIST]: We will also need
to import the frames themselves.

From-SVN: r31969

gcc/ChangeLog
gcc/collect2.c

index bbde8c05fd0c67b31f1266ed1882dc2520eb6c79..c6de25cbe315b8e4572535d35a39e1c8155a4979 100644 (file)
@@ -1,3 +1,10 @@
+2000-02-14  Geoff Keating  <geoffk@cygnus.com>
+
+       * collect2.c (main) [COLLECT_EXPORT_LIST]: If we have frames,
+       then we will need to import the frame handling functions.
+       (scan_prog_file) [COLLECT_EXPORT_LIST]: We will also need
+       to import the frames themselves.
+
 Mon Feb 14 13:31:01 2000  Stan Cox  <scox@cygnus.com>
                           Jason Eckhardt  <jle@cygnus.com>
 
index 3f7cba482365f2d4af2e2048a16442e435d3d958..e9c9181c15f7d871cefa7b96459202c25581c54a 100644 (file)
@@ -580,8 +580,10 @@ dump_file (name)
   fclose (stream);
 }
 \f
-/* Decide whether the given symbol is:
-   a constructor (1), a destructor (2), or neither (0).  */
+/* Decide whether the given symbol is: a constructor (1), a destructor
+   (2), a routine in a shared object that calls all the constructors
+   (3) or destructors (4), a DWARF exception-handling table (5), or
+   nothing special (0).  */
 
 static int
 is_ctor_dtor (s)
@@ -1279,6 +1281,14 @@ main (argc, argv)
       scan_prog_file (list->name, PASS_FIRST);
   }
 
+  if (frame_tables.number > 0 && shared_obj)
+    {
+      /* If there are any frames, then we will need
+         the frame table handling functions.  */
+      add_to_list (&imports, "__register_frame_info_table");
+      add_to_list (&imports, "__deregister_frame_info");
+    }
+
   if (exports.first)
     {
       char *buf = xmalloc (strlen (export_file) + 5);
@@ -2850,6 +2860,20 @@ scan_prog_file (prog_name, which_pass)
                        case 5:
                          if (! is_shared)
                            add_to_list (&frame_tables, name);
+#ifdef COLLECT_EXPORT_LIST
+                         if (which_pass == PASS_OBJ)
+                           add_to_list (&exports, name);
+                         /* If we are building an import list, we
+                            should add the symbol to the list.  
+                            We'd like to do it only if the symbol
+                            is not defined, but we can't tell
+                            that here (it is only known whether a symbol
+                            is referenced and not defined, but who
+                            would reference an EH table entry?).  */
+                         else
+                           if (import_flag)
+                             add_to_list (&imports, name);
+#endif
                          break;
 
                        default:        /* not a constructor or destructor */
This page took 0.07633 seconds and 5 git commands to generate.