https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85238
--- Comment #14 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 11 Apr 2018, ebotcazou at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85238 > > --- Comment #13 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > > Sure, that works for me. > > OK, something like this is apparently sufficient: I think we do need to run dwarf2out_early_finish for the FAT part of the object file so please move this to dwarf2out_early_finish, like for example with Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c (revision 259308) +++ gcc/dwarf2out.c (working copy) @@ -31807,7 +31808,11 @@ dwarf2out_early_finish (const char *file early_dwarf_finished = true; /* Do not generate DWARF assembler now when not producing LTO bytecode. */ - if (!flag_generate_lto && !flag_generate_offload) + if (!flag_generate_lto && !flag_generate_offload + /* FIXME: Disable early debug sections for PE-COFF targets because the + copy_lto_debug_sections operation of the simple object support in + libiberty is not implemented yet. */ + || TARGET_PECOFF) return; /* Now as we are going to output for LTO initialize sections and labels