Fix objcopy's error message when it cannot add a .gnu_debuglink section because the...
authorNick Clifton <nickc@redhat.com>
Wed, 12 Oct 2022 14:32:18 +0000 (15:32 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 12 Oct 2022 14:33:47 +0000 (15:33 +0100)
PR 29665
* objcopy.c (copy_object): Use the input filename when
reporting that a .gnu_debuglink section already exists.

binutils/ChangeLog
binutils/objcopy.c

index 8690d7811ee82d4775026fed11435db54dd8e731..02c667a2762dd534903637f8df441a9dd571eb4f 100644 (file)
@@ -1,3 +1,9 @@
+2022-10-12  Nick Clifton  <nickc@redhat.com>
+
+       PR 29665
+       * objcopy.c (copy_object): Use the input filename when 
+       reporting that a .gnu_debuglink section already exists.
+
 2022-10-03  Nick Clifton  <nickc@redhat.com>
 
        * readelf.c (get_32bit_section_headers): Return false if the
index e9be7633464ad6137ae5b09829da9e3aba177bb5..6ffbdf9c68177c0b09a6f158311185aa1bbf8a58 100644 (file)
@@ -3074,7 +3074,7 @@ copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
       if (bfd_get_section_by_name (obfd, ".gnu_debuglink"))
        {
          non_fatal (_("%s: debuglink section already exists"),
-                    bfd_get_filename (obfd));
+                    bfd_get_filename (ibfd));
          gnu_debuglink_filename = NULL;
        }
       else