Don't write the zlib header if not used
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 24 Mar 2015 20:27:52 +0000 (13:27 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 24 Mar 2015 20:27:52 +0000 (13:27 -0700)
commit8d00121477371cfd1596118af062fe6ff4e263b7
tree1187a8eb071e999258d7fd153cc174114767a14c
parent44a1ee517365cd120f0338c1f4dc5a85273d4e4b
Don't write the zlib header if not used

No need to write the zlib header if compression didn't make the section
smaller.

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
bfd/compress.c