Add --decompress option to readelf to decompress sections before they are dumped.
authorNick Clifton <nickc@redhat.com>
Fri, 15 May 2015 16:16:31 +0000 (17:16 +0100)
committerNick Clifton <nickc@redhat.com>
Fri, 15 May 2015 16:16:31 +0000 (17:16 +0100)
commit0e602686df5677fee06cbd1718b4a7aa5379cd2a
tree728d4833b4bb267e64d627bd7982fcddee260ab5
parent4e63d0ac896b6036edd8e2c09a4dac7aa16a46d1
Add --decompress option to readelf to decompress sections before they are dumped.

bin * readelf.c (options): Add "decompress".
(usage): Mention -z/--decompress.
(parse_args): Handle -z.
(uncompress_section_contents): Move to earlier in the file.
(dump_section_as_strings): If requested, decompress the section
before dumping.
(dump_section_as_bytes): Likewise.
* doc/binutils.texi: Document the new option.

tests * binutils-all/z.s: New test.  Checks the --decompress option to
readelf.
* binutils-all/readelf.exp: Run the test.
* binutils-all/readelf.z: Expected output from readelf.
binutils/ChangeLog
binutils/doc/binutils.texi
binutils/readelf.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/readelf.exp
binutils/testsuite/binutils-all/readelf.z [new file with mode: 0644]
binutils/testsuite/binutils-all/z.s [new file with mode: 0644]