This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [comitted, PATCH] Add SHF_COMPRESSED support to readelf
- From: Doug Evans <dje at google dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Wed, 8 Apr 2015 13:23:58 -0700
- Subject: Re: [comitted, PATCH] Add SHF_COMPRESSED support to readelf
- Authentication-results: sourceware.org; auth=none
- References: <20150405163142 dot GA18529 at gmail dot com>
On Sun, Apr 5, 2015 at 9:31 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> I checked in this patch to update readelf to dump compression header with
>
> readelf -S -W:
>
> [ 4] .debug_info PROGBITS 00000000 000038 00007d 00 C 0 0 1
>
> readelf -t -W:
>
> [ 4] .debug_info
> PROGBITS 00000000 000038 00007d 00 0 0 1
> [00000800]: COMPRESSED
> ZLIB, 0000009d, 1
>
> It also checks the compression header when decompressing the compressed
> section.
>
> * readelf.c (get_elf_section_flags): Support SHF_COMPRESSED.
> (get_compression_header): New.
> (process_section_headers): Dump compression header if needed.
> (uncompress_section_contents): Don't free compressed_buffer here.
> (load_specific_debug_section): Free the compressed buffer, update
> the section buffer and the section size if uncompress is
> successful.
Hi.
fyi, I filed https://sourceware.org/bugzilla/show_bug.cgi?id=18218
You probably fixed the original bug I was seeing (mishandling of sec->sh_size,
though I'm not positive),
but I'm now seeing a new bug: fetch_indexed_string is being called
with compressed contents for .[z]debug_str_offsets.dwo.