Check format against bfd_object directly

There is no need to call bfd_check_format.  We should just check format
against bfd_object directly.

	* plugin.c (plugin_maybe_claim): Check format against bfd_object
	directly.
This commit is contained in:
H.J. Lu 2015-02-08 08:45:23 -08:00
parent 63a5fbcfa8
commit e13419c472
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2015-02-08 H.J. Lu <hongjiu.lu@intel.com>
* plugin.c (plugin_maybe_claim): Check format against bfd_object
directly.
2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
* plugin.c (plugin_maybe_claim): Replace entry->the_bfd with

View File

@ -1061,7 +1061,7 @@ plugin_maybe_claim (lang_input_statement_type *entry)
einfo (_("%P%F: %s: plugin reported error claiming file\n"),
plugin_error_plugin ());
if (input->fd != -1 && bfd_check_format (ibfd, bfd_object))
if (input->fd != -1 && ibfd->format == bfd_object)
{
/* FIXME: fd belongs to us, not the plugin. IR for GCC plugin,
which doesn't need fd after plugin_call_claim_file, is