objcopy for {i686,x86_64}-w64-mingw32 accepts --compress-debug-sections but does nothing. uncompressed sections are still present in output.
This is a general pe-coff and coff issue. Not specific to mingw targets. I have a patch for that issue and will sent it ML for review.
CVSROOT: /cvs/src Module name: src Changes by: ktietz@sourceware.org 2012-10-18 17:42:29 Modified files: binutils : ChangeLog objdump.c ld : ChangeLog bfd : ChangeLog coff-i386.c coff-x86_64.c coffcode.h coffgen.c cofflink.c compress.c libcoff-in.h libcoff.h pe-arm.c pe-i386.c pe-x86_64.c peXXigen.c ld/scripttempl : pe.sc pep.sc Log message: ChangeLog bfd 2012-10-18 Kai Tietz <ktietz@redhat.com> PR binutils/14067 * coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE. Allow BFD_COMPRESS and BFD_DECOMPRESS flags. * coff-x86_64.c: Likewise. * coffcode.h (DOT_ZDEBUG): New define. (sec_to_styp_flags): Check for .zdebug. (styp_to_sec_flags): Likewise. * coffgen.c (make_a_section): Handle .debug_* section compression/decompression flags. * cofflink.c (mark_relocs): Ignore relocations for a section, which isn't marked as used. (_bfd_coff_link_input_bfd): Add support of compressed debug sections. * compress.c (decompress_contents): Loop as long as there is input available and there is room for output. * bfd/pe-arm.c: Add .zdebug_ partial match entry. * pe-i386.c: Likewise. * pe-x86_64.c: Likewise. * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all data-directories as this might destroy content. * coff-i386.c (_bfd_generic_find_nearest_line_discriminator): define as coff_find_nearest_line_discriminator. * libcoff-in.h (coff_find_nearest_line_discriminator): New * libcoff.h: Regenerated. * coff-x86_64.c: Likewise. * coffgen.c (coff_find_nearest_line_discriminator): New function. prototype. ChangeLog binutils 2012-10-18 Kai Tietz <ktietz@redhat.com> * objdump.c (dump_bfd): Call dump headers after call of slurp_symtab. ChangeLog ld 2012-10-18 Kai Tietz <ktietz@redhat.com> PR binutils/14067 * NEWS: Menition new feature. * scripttempl/pep.sc: Add zdebug sections. * scripttempl/pe.sc: L Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.1943&r2=1.1944 http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/objdump.c.diff?cvsroot=src&r1=1.196&r2=1.197 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/ChangeLog.diff?cvsroot=src&r1=1.2495&r2=1.2496 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5819&r2=1.5820 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/coff-i386.c.diff?cvsroot=src&r1=1.37&r2=1.38 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/coff-x86_64.c.diff?cvsroot=src&r1=1.15&r2=1.16 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/coffcode.h.diff?cvsroot=src&r1=1.182&r2=1.183 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/coffgen.c.diff?cvsroot=src&r1=1.84&r2=1.85 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/cofflink.c.diff?cvsroot=src&r1=1.82&r2=1.83 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/compress.c.diff?cvsroot=src&r1=1.12&r2=1.13 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/libcoff-in.h.diff?cvsroot=src&r1=1.46&r2=1.47 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/libcoff.h.diff?cvsroot=src&r1=1.63&r2=1.64 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/pe-arm.c.diff?cvsroot=src&r1=1.14&r2=1.15 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/pe-i386.c.diff?cvsroot=src&r1=1.15&r2=1.16 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/pe-x86_64.c.diff?cvsroot=src&r1=1.5&r2=1.6 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/peXXigen.c.diff?cvsroot=src&r1=1.70&r2=1.71 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/scripttempl/pe.sc.diff?cvsroot=src&r1=1.31&r2=1.32 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/scripttempl/pep.sc.diff?cvsroot=src&r1=1.19&r2=1.20
Fixed