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: Mon, 22 Jan 2024 11:58:09 +0100	[thread overview]
Message-ID: <ac6c8893-0c42-46f8-ba39-0ef006290047@suse.com> (raw)
In-Reply-To: <CAGp1TcE+rzVZGThYwQ5On7XWTVUH91w8MN648iDH_5t+27=Z2g@mail.gmail.com>

On 22.01.2024 11:43, Maxim Dementyev wrote:
> The readelf utility has a very useful option - "--string-dump=<number or
> name>" which displays the contents of the indicated section as is (as
> printable strings).
> As far as I can understand, to do the same with the objdump you need to do
> "objdump --section=<number or name> --full-contents ...".
> But the output is in the "hexdump" format, the contents is splitted by 0x10
> size blocks (so, not possible to grep on this contents).
> 
> Is there any plans to implement a printable strings format for this case
> for the objdump utility?
> Or is there a solution without parsing the hexdump format and restoring
> these printable strings?

From what you write I can only guess that you'd like to use the functionality
on non-ELF objects which binutils as whole (and maybe objdump in particular)
supports. If so, is there a reason you can't extract the section(s) in
question using "objcopy --only-section" (e.g. as a raw binary file), and then
use "strings" on the result?

Jan

  reply	other threads:[~2024-01-22 10:58 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 [this message]
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
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=ac6c8893-0c42-46f8-ba39-0ef006290047@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).