diff options
Diffstat (limited to 'bfd/vms-alpha.c')
-rw-r--r-- | bfd/vms-alpha.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index 5d38d1d..ba195f9 100644 --- a/bfd/vms-alpha.c +++ b/bfd/vms-alpha.c @@ -8220,6 +8220,7 @@ alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) symindex symidx; bfd *element; bfd *orig_element; + bfd *subsbfd; h = *pundef; next_pundef = &(*pundef)->u.undef.next; @@ -8277,10 +8278,14 @@ alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) /* Unlike the generic linker, we know that this element provides a definition for an undefined symbol and we know that we want to include it. We don't need to check anything. */ - if (! (*info->callbacks->add_archive_element) (info, element, - h->root.string)) + subsbfd = NULL; + if (! (*info->callbacks->add_archive_element) + (info, element, h->root.string, &subsbfd)) return FALSE; - if (! alpha_vms_link_add_object_symbols (element, info)) + /* Potentially, the add_archive_element hook may have set a + substitute BFD for us. */ + if (! alpha_vms_link_add_object_symbols (subsbfd ? subsbfd : element, + info)) return FALSE; orig_element->archive_pass = pass; |