This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed, PATCH] Check format against bfd_object directly
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Date: Sun, 8 Feb 2015 08:47:26 -0800
- Subject: [committed, PATCH] Check format against bfd_object directly
- Authentication-results: sourceware.org; auth=none
There is no need to call bfd_check_format. We should just check format
against bfd_object directly. Checked it in.
H.J.
--
* plugin.c (plugin_maybe_claim): Check format against bfd_object
directly.
---
ld/ChangeLog | 5 +++++
ld/plugin.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 00c9466..856249b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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
diff --git a/ld/plugin.c b/ld/plugin.c
index c4116fb..5b8a7cf 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -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
--
2.1.0