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

H.J. Lu hjl.tools@gmail.com
Sun Apr 5 15:19:00 GMT 2015


On Tue, Mar 24, 2015 at 7:08 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> 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.
>

We should xfail the compressed debug section test if there are
no compressed sections.  Committed.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Xfail-the-compressed-debug-sections.patch
Type: text/x-patch
Size: 3686 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150405/a7eb6d7b/attachment.bin>


More information about the Binutils mailing list