https://sourceware.org/bugzilla/show_bug.cgi?id=24809

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
I can replicate this if I use objcopy to produce the hello.debug and
hello.stripped binaries. But why don't you just use eu-strip?

Doing:
$ eu-strip -f hello.debug -o hello.stripped hello
$ eu-unstrip hello.stripped hello.debug -o hello.unstripped

Produces:
$ ls -la
-rwxrwxr-x. 1 mark mark 10416 Jul 15 14:50 hello
-rw-rw-r--. 1 mark mark    92 Jul 15 14:50 hello.c
-rwxrwxr-x. 1 mark mark  6840 Jul 15 14:52 hello.debug
-rwxrwxr-x. 1 mark mark  6488 Jul 15 14:52 hello.stripped
-rwxrwxr-x. 1 mark mark 10416 Jul 15 14:52 hello.unstripped

$ readelf -s hello.debug | grep -c SECTION
0
$ readelf -s hello.stripped | grep -c SECTION
0
$ readelf -s hello.unstripped | grep -c SECTION
0

Which seems much more reasonable than what objcopy does.

I am not sure eu-unstrip should remove extra stuff objcopy adds. It seems that
if the user created these bigger than necessary .debug and .stripped files,
then they wanted that for some reason. It seems unwise to second guess the
user.

If there is a bug, then I think it is simply a bug in objcopy, which can be
prevented by using eu-strip instead.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to