void plugin_maybe_claim (lang_input_statement_type *entry) { if (plugin_object_p (entry->the_bfd)) { bfd *abfd = entry->the_bfd->plugin_dummy_bfd; /* Discard the real file's BFD and substitute the dummy one. */ /* BFD archive handling caches elements so we can't call bfd_close for archives. */ if (entry->the_bfd->my_archive == NULL) bfd_close (entry->the_bfd); entry->the_bfd = abfd; entry->flags.claimed = 1; } }
void plugin_maybe_claim (lang_input_statement_type *entry) { if (plugin_object_p (entry->the_bfd)) { bfd *abfd = entry->the_bfd->plugin_dummy_bfd; /* Discard the real file's BFD and substitute the dummy one. */ /* We can't call bfd_close on archives. BFD archive handling caches elements, and add_archive_element keeps pointers to the_bfd and the_bfd->filename in a lang_input_statement_type linker script statement. */ if (entry->the_bfd->my_archive == NULL) bfd_close (entry->the_bfd); entry->the_bfd = abfd; entry->flags.claimed = 1; } }