public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug tools/24809] eu-unstrip to drop SECTION symbols if section .note.gnu.gold-version present
Date: Mon, 15 Jul 2019 12:59:00 -0000	[thread overview]
Message-ID: <bug-24809-10460-g8uL4tJUur@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-24809-10460@http.sourceware.org/bugzilla/>

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	other threads:[~2019-07-15 12:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-15 10:59 [Bug tools/24809] New: " vries at gcc dot gnu.org
2019-07-15 12:59 ` mark at klomp dot org [this message]
2019-07-15 13:14 ` [Bug binutils/24809] objcopy to not add " vries at gcc dot gnu.org
2019-07-25 16:25 ` cvs-commit at gcc dot gnu.org
2019-07-25 16:30 ` nickc at redhat dot com
2019-07-25 16:36 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-24809-10460-g8uL4tJUur@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).