Check format against bfd_object directly
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 8 Feb 2015 16:45:23 +0000 (08:45 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 8 Feb 2015 16:45:23 +0000 (08:45 -0800)
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.

ld/ChangeLog
ld/plugin.c

index 00c9466a245d3816a63cff79ec1d477b567bce32..856249b1676e6913f8bd5438e4d42d6913c25d92 100644 (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
index c4116fb54b2553ad5ae899072ba8bb270116b1a0..5b8a7cfa1173fe554d78f44f5853f3158477bf6d 100644 (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
This page took 0.025398 seconds and 4 git commands to generate.