aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-12-12 14:52:27 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-12-12 14:52:27 +0000
commitdb0ca79ff43c1ca413646ef08baa220a79ab44f2 (patch)
treed58d19e2967fcc3dc6bd968d68bf288f1c22e2b7 /ld/ldlang.c
parent68efed4197a833bbc5ca02116098e6f67a2608d6 (diff)
downloadgdb-db0ca79ff43c1ca413646ef08baa220a79ab44f2.zip
gdb-db0ca79ff43c1ca413646ef08baa220a79ab44f2.tar.gz
gdb-db0ca79ff43c1ca413646ef08baa220a79ab44f2.tar.bz2
Optimize for add_archive_element.
bfd/ 2010-12-12 H.J. Lu <hongjiu.lu@intel.com> * elflink.c (elf_link_add_archive_symbols): Remove subsbfd. ld/ 2010-12-12 H.J. Lu <hongjiu.lu@intel.com> * ldlang.c (load_symbols): Optimize for add_archive_element.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index e804a53..03a11bd 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -2717,15 +2717,14 @@ load_symbols (lang_input_statement_type *entry,
loaded = FALSE;
}
- subsbfd = NULL;
+ subsbfd = member;
if (! ((*link_info.callbacks->add_archive_element)
(&link_info, member, "--whole-archive", &subsbfd)))
abort ();
/* Potentially, the add_archive_element hook may have set a
substitute BFD for us. */
- if (! bfd_link_add_symbols (subsbfd ? subsbfd : member,
- &link_info))
+ if (! bfd_link_add_symbols (member, &link_info))
{
einfo (_("%F%B: could not read symbols: %E\n"), member);
loaded = FALSE;