summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-14 19:46:02 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-14 19:46:02 +0000
commitd14933cf9ef9e536bbc0c621ea32a9d21467f247 (patch)
treea775b2cf6195ffd669edfe387ad5512b88cf92b3
parent5a88ea644af4c50358a659262a2482a075408163 (diff)
downloadgcc-d14933cf9ef9e536bbc0c621ea32a9d21467f247.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31969 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/collect2.c28
2 files changed, 33 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bbde8c05fd0..c6de25cbe31 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 3f7cba48236..e9c9181c15f 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -580,8 +580,10 @@ dump_file (name)
fclose (stream);
}
-/* 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 */