public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Maxim Dementyev <mdementyev@fluendo.com>
Cc: binutils@sourceware.org
Subject: Re: readelf --string-dump analog for objdump
Date: Tue, 23 Jan 2024 08:41:33 +0100	[thread overview]
Message-ID: <fc87932a-bcc4-4df6-9978-3c1108c98e0b@suse.com> (raw)
In-Reply-To: <CAGp1TcFzj5ukSK-sX1O6rnRot+9Ajtqt-hRUvm0agA+2A1j-rA@mail.gmail.com>

On 22.01.2024 18:19, Maxim Dementyev wrote:
> On Mon, Jan 22, 2024 at 1:19 PM Jan Beulich <jbeulich@suse.com> wrote:
> 
>> On 22.01.2024 13:11, Maxim Dementyev wrote:
>>> Unfortunately, apart from this, again, the objdump utility creates a
>>> formatted file as an output, and I can add --only-section to reduce the
>>> size of it and redirect it to /dev/null.
>>
>> But you're aware of objcopy's --output-target option, by using of which
>> you could have it produce a raw binary output file?
>>
>> I'm using GNU objcopy (Gentoo 2.41 p4) 2.41.0.
> 
> There is no such a type for --output-target as raw
> (invalid bfd target), only binary;
> but this format produces a file with zero length.

Not for me. Did you specify -j <section> for the tool to know
what to copy?

> At the same time, if I do not use this option,
> by default it's elf64-x86-64 and the size is 816 bytes.

Of course.

> The file generated by --dump-section has the length
> of 198 bytes, and this is all that I need,
> no other stuff.

Well, if that is what you need, then I see no problem with you
going this route. I merely wanted to point out that there is an
alternative. (I was actually surprised when I first saw
--dump-section, as that looks to me like merely shorthand for the
-O / -j combination.)

Jan

  reply	other threads:[~2024-01-23  7:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22 10:43 Maxim Dementyev
2024-01-22 10:58 ` Jan Beulich
2024-01-22 12:11   ` Maxim Dementyev
2024-01-22 12:19     ` Jan Beulich
2024-01-22 17:19       ` Maxim Dementyev
2024-01-23  7:41         ` Jan Beulich [this message]
2024-01-22 17:42 ` Nick Clifton
2024-01-22 18:03   ` Maxim Dementyev

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=fc87932a-bcc4-4df6-9978-3c1108c98e0b@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=mdementyev@fluendo.com \
    /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).