aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2022-10-12 15:32:18 +0100
committerNick Clifton <nickc@redhat.com>2022-10-12 15:33:47 +0100
commit7fd882d4ad91916fd8a05148117f05ea9f5d756c (patch)
treee52d136e2f99f4f1f4fe0cdf95a6a754ec5595f2 /binutils
parent4bd531c7ffda1df83b6e54ce11f28a0821e3d59e (diff)
downloadgdb-7fd882d4ad91916fd8a05148117f05ea9f5d756c.zip
gdb-7fd882d4ad91916fd8a05148117f05ea9f5d756c.tar.gz
gdb-7fd882d4ad91916fd8a05148117f05ea9f5d756c.tar.bz2
Fix objcopy's error message when it cannot add a .gnu_debuglink section because the section already exists.
PR 29665 * objcopy.c (copy_object): Use the input filename when reporting that a .gnu_debuglink section already exists.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/objcopy.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 8690d78..02c667a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index e9be763..6ffbdf9 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -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