[committed, PATCH] Don't write the zlib header if not used

H.J. Lu hjl.tools@gmail.com
Wed Mar 25 02:08:00 GMT 2015


On Tue, Mar 24, 2015 at 1:30 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> No need to write the zlib header if compression didn't make the section
> smaller.  I checked this into master.
>
>
> H.J.
> ---
>         PR binutils/18087
>         * compress.c (bfd_compress_section_contents): Don't write the
>         zlib header and set contents as well as compress_status if
>         compression didn't make the section smaller.
>         (bfd_init_section_compress_status): Don't check compression
>         size here.
> ---
>  bfd/ChangeLog  |  9 +++++++++
>  bfd/compress.c | 56 ++++++++++++++++++++++++++------------------------------
>  2 files changed, 35 insertions(+), 30 deletions(-)
>
> diff --git a/bfd/ChangeLog b/bfd/ChangeLog
> index 73c155c..469066b 100644
> --- a/bfd/ChangeLog
> +++ b/bfd/ChangeLog
> @@ -1,3 +1,12 @@
> +2015-03-24  H.J. Lu  <hongjiu.lu@intel.com>
> +
> +       PR gas/18087
> +       * compress.c (bfd_compress_section_contents): Don't write the
> +       zlib header and set contents as well as compress_status if
> +       compression didn't make the section smaller.
> +       (bfd_init_section_compress_status): Don't check compression
> +       size here.
> +

I also committed a similar patch for gas.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-write-the-zlib-header-if-not-used.patch
Type: text/x-patch
Size: 2907 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150325/dcbfb558/attachment.bin>


More information about the Binutils mailing list