[PATCH] ld: drop bogus %F format modifiers

Jan Beulich jbeulich@suse.com
Tue Aug 26 08:47:55 GMT 2025


Support for %F was dropped in 6d74c1f313df ("PR 32603 followup, remove
%F from einfo").
---
Of course many instances remain in translated files (.../po/*.po).

--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -3437,8 +3437,8 @@ _bfd_riscv_elf_link_setup_gnu_properties
 					    | SEC_READONLY | SEC_HAS_CONTENTS
 					    | SEC_DATA));
 	  if (sec == NULL)
-	    info->callbacks->einfo (
-	      _ ("%F%P: failed to create GNU property section\n"));
+	    info->callbacks->fatal (
+	      _("%P: failed to create GNU property section\n"));
 
 	  elf_section_type (sec) = SHT_NOTE;
 	}
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -10849,7 +10849,7 @@ cmdline_add_object_only_section (bfd_byt
   /* ibfd needs to be closed *after* obfd, otherwise ld may crash with a
      segmentation fault.  */
   if (!bfd_close (ibfd))
-    einfo (_("%P%F: failed to close input\n"));
+    fatal (_("%P: failed to close input\n"));
 
   /* Must be freed after bfd_close ().  */
   free (isympp);
@@ -10857,7 +10857,7 @@ cmdline_add_object_only_section (bfd_byt
 
   /* Must unlink to ensure rename works on Windows.  */
   if (unlink (output_filename) && errno != ENOENT)
-    einfo (_("%P%F: failed to unlink %s\n"), output_filename);
+    fatal (_("%P: failed to unlink %s\n"), output_filename);
 
   if (rename (ofilename, output_filename))
     {


More information about the Binutils mailing list