[committed, PATCH] Don't add the zlib header to SHF_COMPRESSED section

H.J. Lu hjl.tools@gmail.com
Thu May 14 23:04:00 GMT 2015


On Wed, May 13, 2015 at 11:51 PM, Cary Coutant <ccoutant@gmail.com> wrote:

> I don't see how this is going to work right. This patch doesn't do anything
> to decompress_input_section, so in an SHF_COMPRESS section, it looks like
> you're expecting both an Elf compression header *and* the old-style "ZLIB"
> plus 8 big-endian bytes. That's wrong. In a new-style compressed section,
> the raw compressed data should begin immediately after the compression
> header. For reference from the gABI proposal:
>
>  ELFCOMPRESS_ZLIB
>         The section data is compressed with the ZLIB compression algorithm.
>         The compressed ZLIB data bytes begin with the byte immediately
>         following the compression header, and extend to the end of the
>         section. Additional documentation for ZLIB may be found at
>         http://zlib.net/.
>

Oops.  My bad.  I checked in this to fix it.


-- 
H.J.
---
In a SHF_COMPRESSED compressed section, the raw compressed data should
begin immediately after the compression header.  This patch removes the
extra zlib header from the SHF_COMPRESSED section.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-add-the-zlib-header-to-SHF_COMPRESSED-section.patch
Type: text/x-patch
Size: 38093 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150514/9599c8ec/attachment.bin>


More information about the Binutils mailing list