aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
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;