aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.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 /bfd/elflink.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 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 32575d9..a8aac7c 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -5011,7 +5011,6 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
{
struct elf_link_hash_entry *h;
bfd *element;
- bfd *subsbfd = NULL;
struct bfd_link_hash_entry *undefs_tail;
symindex mark;
@@ -5075,11 +5074,9 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
undefs_tail = info->hash->undefs_tail;
if (! (*info->callbacks->add_archive_element)
- (info, element, symdef->name, &subsbfd))
+ (info, element, symdef->name, &element))
goto error_return;
- /* Potentially, the add_archive_element hook may have set a
- substitute BFD for us. */
- if (! bfd_link_add_symbols (subsbfd ? subsbfd : element, info))
+ if (! bfd_link_add_symbols (element, info))
goto error_return;
/* If there are any new undefined symbols, we need to make