readelf --string-dump analog for objdump

Maxim Dementyev mdementyev@fluendo.com
Mon Jan 22 17:19:12 GMT 2024


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.

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

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

So I don't see how I can generate the same contents
without --dump-section option, just by pointing out some
other bfd format?

Regards,
Max

-- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20240122/c648cf68/attachment.htm>


More information about the Binutils mailing list