[binutils-gdb] ld: Call cmdline_check_object_only_section only if plugin is enabled

H.J. Lu hjl@sourceware.org
Tue Jan 14 08:14:36 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6ac02727dc9fd1f4b505a4e8cca30b6c75bd4899

commit 6ac02727dc9fd1f4b505a4e8cca30b6c75bd4899
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jan 14 16:12:37 2025 +0800

    ld: Call cmdline_check_object_only_section only if plugin is enabled
    
            * 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>

Diff:
---
 ld/ldfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ld/ldfile.c b/ld/ldfile.c
index 530a5fef5e3..5a4c7c26590 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -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.  */


More information about the Binutils-cvs mailing list