]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld: Call cmdline_check_object_only_section only if plugin is enabled
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 14 Jan 2025 08:12:37 +0000 (16:12 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 14 Jan 2025 08:12:37 +0000 (16:12 +0800)
* ldfile.c (ldfile_try_open_bfd): Call
cmdline_check_object_only_section only if BFD_SUPPORTS_PLUGINS
is defined.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
ld/ldfile.c

index 530a5fef5e3786adc63b6f6533d287ea3e55d465..5a4c7c2659077b36307c9e8e1e14a81f61dbd089 100644 (file)
@@ -533,8 +533,8 @@ ldfile_try_open_bfd (const char *attempt,
       && bfd_check_format (entry->the_bfd, bfd_object))
     plugin_maybe_claim (entry);
   else
-#endif /* BFD_SUPPORTS_PLUGINS */
     cmdline_check_object_only_section (entry->the_bfd, false);
+#endif /* BFD_SUPPORTS_PLUGINS */
 
   /* It opened OK, the format checked out, and the plugins have had
      their chance to claim it, so this is success.  */