#960686 objcopy uses gibberish name in error message

Package:
binutils
Source:
binutils
Description:
GNU assembler, linker and binary utilities
Submitter:
Matthias Klose
Date:
2021-01-27 19:27:05 UTC
Severity:
minor
Tags:
#960686#5
Date:
2020-05-15 12:18:59 UTC
From:
To:
Building gcc-snapshot you see

dh_strip -pgcc-snapshot -Xdebug -X/cgo -Xbin/go -Xbin/gofmt \

objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/stPxkJ3q: debuglink
section already exists
objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/stiq41jf: debuglink
section already exists
objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/stp57md7: debuglink
section already exists
objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/stUrD9Ye: debuglink
section already exists
objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/stDxcAwp: debuglink
section already exists
objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/st3GA6QZ: debuglink
section already exists
objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/stcDa5aF: debuglink
section already exists
objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/stlmmSfM: debuglink
section already exists
objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/stXORwhW: debuglink
section already exists
objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/stHWQlbz: debuglink
section already exists
objcopy: debian/gcc-snapshot/usr/lib/gcc-snapshot/bin/stUWYSEI: debuglink
section already exists

It would be nice to emit the name of the original files as well, making
debugging issues a bit easier. So maybe buffer objcopy's output and in case of a
message, print the original file name.

#960686#14
Date:
2021-01-27 19:09:33 UTC
From:
To:
Control: reassign -1 binutils

Hi,

That "gibberish" name is an internal name used in objcopy and it makes
more sense to fix this bug at its roots (which would be in objcopy
itself), reassigning accordingly.

Reproducer:

"""
$ cd /tmp
$ cp /bin/ls .
$ objcopy --add-gnu-debuglink /bin/test ls
objcopy: stnJQXz3: debuglink section already exists
"""

The "stnJQXz3" name is indeed not very helpful and should have said "ls"
(or "/tmp/ls" in this case)

~Niels