OSDN Git Service

Optimize for add_archive_element.
[pf3gnuchains/pf3gnuchains4x.git] / bfd / elflink.c
index 32575d9..a8aac7c 100644 (file)
@@ -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