bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/24809] objcopy to not add SECTION symbols if section .note


From: vries at gcc dot gnu.org
Subject: [Bug binutils/24809] objcopy to not add SECTION symbols if section .note.gnu.gold-version present
Date: Mon, 15 Jul 2019 13:14:16 +0000

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tools                       |binutils
            Version|unspecified                 |2.33 (HEAD)
            Product|elfutils                    |binutils
            Summary|eu-unstrip to drop SECTION  |objcopy to not add SECTION
                   |symbols if section          |symbols if section
                   |.note.gnu.gold-version      |.note.gnu.gold-version
                   |present                     |present

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Mark Wielaard from comment #1)
> 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?
> 

I think the idea here is to have the tools from the two "products" to play nice
together.

> 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.
> 

Right, I noticed that.

> 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.

OK, changing product to binutils.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]