diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-02-08 15:00:34 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-02-08 15:00:34 -0800 |
commit | 1d5b29cfe459ceb6d0965ca3ab8936e0d72e1fd5 (patch) | |
tree | 7670357b2e59b0a592e5fd563b1a76589912b56c /ld/ldfile.c | |
parent | e13419c472637ebc6ad1554bdc6d50f2bd793574 (diff) | |
download | gdb-1d5b29cfe459ceb6d0965ca3ab8936e0d72e1fd5.zip gdb-1d5b29cfe459ceb6d0965ca3ab8936e0d72e1fd5.tar.gz gdb-1d5b29cfe459ceb6d0965ca3ab8936e0d72e1fd5.tar.bz2 |
Don't bfd_check_format if not needed
When plugin isn't active or there is no thing more to claim, we don't
need to call bfd_check_format.
* ldfile.c (ldfile_try_open_bfd): Don't call bfd_check_format
if plugin isn't active or there is no thing more to claim.
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r-- | ld/ldfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c index 05889f2..e19f55e 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -301,9 +301,9 @@ success: bfd_object that it sets the bfd's arch and mach, which will be needed when and if we want to bfd_create a new one using this one as a template. */ - if (bfd_check_format (entry->the_bfd, bfd_object) - && link_info.lto_plugin_active - && !no_more_claiming) + if (link_info.lto_plugin_active + && !no_more_claiming + && bfd_check_format (entry->the_bfd, bfd_object)) plugin_maybe_claim (entry); #endif /* ENABLE_PLUGINS */ |