]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld: Set the is_linker_input field
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 18 Aug 2025 12:33:04 +0000 (05:33 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 18 Aug 2025 14:01:42 +0000 (07:01 -0700)
Set the is_linker_input field when adding object only section.

* ldlang.c (cmdline_add_object_only_section): Set the
is_linker_input field.

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

index 2e6d0108f989023e874aaa3d52e140b08bffa3ba..048c8480786954dea3409f7088b58be9267a6c63 100644 (file)
@@ -10713,6 +10713,9 @@ cmdline_add_object_only_section (bfd_byte *contents, size_t size)
       goto loser;
     }
 
+  /* This is a linker input BFD.  */
+  ibfd->is_linker_input = 1;
+
   if (!bfd_check_format_matches (ibfd, bfd_object, &matching))
     {
       err = bfd_errmsg (bfd_get_error ());