diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 4 | ||||
-rw-r--r-- | ld/ldlang.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 58b6e82..ca9baf8 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2010-12-12 H.J. Lu <hongjiu.lu@intel.com> + + * ldlang.c (load_symbols): Optimize for add_archive_element. + 2010-12-09 Mike Frysinger <vapier@gentoo.org> * .gitignore: New file. 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; |