Re: [PATCH] [PR binutils/15350] Fix compressed debug sections for PE targets
On Fri, Dec 27, 2019 at 07:47:44PM +0100, Hannes Domani via binutils wrote:
> When objcopy --compress-debug-sections was used, it actually did the
> compression, but the zlib header was not written, so the resulting debug info
> was invalid.
> 2019-12-27 Hannes Domani <[hidden email]>
> * bfd.c (bfd_update_compression_header):
> Write zlib header for compressed debug sections of PE files.
Thanks! I'm going to commit the following variation on your patch.
diff -w shown to omit indentation changes.
* bfd.c (bfd_update_compression_header): Write zlib header for
formats other than ELF too.
/* Write the zlib header. It should be "ZLIB" followed by
the uncompressed section size, 8 bytes in big-endian
@@ -2588,12 +2589,9 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
bfd_putb64 (sec->size, contents + 4);
/* No way to keep the original alignment, just use 1 always. */
bfd_set_section_alignment (sec, 0);
- abort ();