mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-04 18:13:44 +08:00
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
This commit is contained in:
parent
11bdd2ae4e
commit
59309a850d
@ -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>
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user