diff options
author | Geoff Keating <geoffk@cygnus.com> | 2000-02-14 19:46:02 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2000-02-14 19:46:02 +0000 |
commit | 59309a850d34040bba4b8ccf5b994227e43b7789 (patch) | |
tree | a775b2cf6195ffd669edfe387ad5512b88cf92b3 /gcc/collect2.c | |
parent | 11bdd2ae4efbff02dd7422fb2c5ebe39332f6046 (diff) | |
download | gcc-59309a850d34040bba4b8ccf5b994227e43b7789.zip gcc-59309a850d34040bba4b8ccf5b994227e43b7789.tar.gz gcc-59309a850d34040bba4b8ccf5b994227e43b7789.tar.bz2 |
collect2.c (main): If we have frames, then we will need to import the frame handling functions.
* 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
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r-- | gcc/collect2.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index 3f7cba4..e9c9181 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 */ |