readelf --string-dump analog for objdump
Jan Beulich
jbeulich@suse.com
Mon Jan 22 10:58:09 GMT 2024
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
More information about the Binutils
mailing list