aboutsummaryrefslogtreecommitdiff
path: root/binutils/doc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2023-11-14 10:57:58 +0000
committerNick Clifton <nickc@redhat.com>2023-11-14 10:57:58 +0000
commitfab62191f84583780c2c6d024d0e583400881770 (patch)
tree8d3f4bec0f333cfab0808a08f8e435cdc2bc9171 /binutils/doc
parent319b460545dc79280e2904dcc280057cf71fb753 (diff)
downloadgdb-fab62191f84583780c2c6d024d0e583400881770.zip
gdb-fab62191f84583780c2c6d024d0e583400881770.tar.gz
gdb-fab62191f84583780c2c6d024d0e583400881770.tar.bz2
Improve objdump's handling of compressed sections.
PR 31062 * objdump.c (decompressed_dumps): New local variable. (usage): Mention the -z/--decompress option. (long_options): Add --decompress. (dump_section_header): Add "COMPRESSED" to the Flags field of any compressed section. (dump_section): Warn users when dumping a compressed section. (display_any_bfd): Decompress the section if decompressed_dumps is true. (main): Handle the -z/--decompress option. * NEWS: Mention the new feature. * doc/binutils.texi: Document the new feature. * testsuite/binutils-all/objdump.s: Update expected output. * testsuite/binutils-all/objdump.exp: Add test of -Z -s. * testsuite/binutils-all/objdump.Zs: New file. * readelf.c (maybe_expand_or_relocate_section): New function. Contains common code found in dump functions. Adds a note message if a compressed section is not being decompressed. (dump_section_as_strings): Use new function. (dump_section_as_bytes): Likewise.
Diffstat (limited to 'binutils/doc')
-rw-r--r--binutils/doc/binutils.texi15
1 files changed, 14 insertions, 1 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index f946936..ec23a78 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -2269,6 +2269,7 @@ objdump [@option{-a}|@option{--archive-headers}]
[@option{-r}|@option{--reloc}]
[@option{-R}|@option{--dynamic-reloc}]
[@option{-s}|@option{--full-contents}]
+ [@option{-Z}|@option{--decompress}]
[@option{-W[lLiaprmfFsoORtUuTgAck]}|
@option{--dwarf}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links]]
[@option{-WK}|@option{--dwarf=follow-links}]
@@ -2800,7 +2801,10 @@ disassembly.
@cindex object file sections
Display the full contents of sections, often used in combination with
@option{-j} to request specific sections. By default all non-empty
-non-bss sections are displayed.
+non-bss sections are displayed. By default any compressed section
+will be displayed in its compressed form. In order to see the
+contents in a decompressed form add the @option{-Z} option to the
+command line.
@item -S
@itemx --source
@@ -3056,6 +3060,15 @@ Also do not truncate symbol names when they are displayed.
Normally the disassembly output will skip blocks of zeroes. This
option directs the disassembler to disassemble those blocks, just like
any other data.
+
+@item -Z
+@itemx --decompress
+@cindex sections, full contents
+@cindex object file sections
+@cindex compressed section contents
+The @option{-Z} option is meant to be used in conunction with the
+@option{-s} option. It instructs @command{objdump} to decompress any
+compressed sections before displaying their contents.
@end table
@c man end