From fab62191f84583780c2c6d024d0e583400881770 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 14 Nov 2023 10:57:58 +0000 Subject: 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. --- binutils/NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'binutils/NEWS') diff --git a/binutils/NEWS b/binutils/NEWS index 1aae340..3bf3b56 100644 --- a/binutils/NEWS +++ b/binutils/NEWS @@ -1,5 +1,13 @@ -*- text -*- +* The objdump program has a new command line option -Z/--decompress which + changes the behaviour of the -s/--full-contents option, forcing it to + decompress the contents of any compressed section before they are displayed. + + In addition when objdump is displaying sections headers (via the -h/--headers + command line option) it will now display "COMPRESSED" in the Flags field of + any compressed section. + * The readelf program has a new command line option --extra-sym-info which extends the information displayed by the --symbols option. When enabled the display will include the name of the section referenced by a symbol's -- cgit v1.1