summaryrefslogtreecommitdiff
path: root/ld/plugin.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-02-08 08:45:23 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-02-08 08:45:23 -0800
commite13419c472637ebc6ad1554bdc6d50f2bd793574 (patch)
treed2fb3ad67de8a6513fa474b16735d7e827cbeed3 /ld/plugin.c
parent63a5fbcfa8e56cb07bcffa73dbef7518f3c0990a (diff)
downloadbinutils-gdb-e13419c472637ebc6ad1554bdc6d50f2bd793574.tar.gz
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.
Diffstat (limited to 'ld/plugin.c')
-rw-r--r--ld/plugin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/plugin.c b/ld/plugin.c
index c4116fb54b2..5b8a7cfa117 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