PE linker segmentation fault with MALLOC_PERTURB_=1
[deliverable/binutils-gdb.git] / ld / emultempl / pep.em
index c0070c0fbef3f7a7089b08acf07d613877fb2be1..649efaf92c399c8ad473272a8ce8c971fb1b7818 100644 (file)
@@ -1348,7 +1348,8 @@ gld_${EMULATION_NAME}_after_open (void)
      FIXME: This should be done via a function, rather than by
      including an internal BFD header.  */
 
-  if (coff_data (link_info.output_bfd) == NULL
+  if (bfd_get_flavour (link_info.output_bfd) != bfd_target_coff_flavour
+      || coff_data (link_info.output_bfd) == NULL
       || coff_data (link_info.output_bfd)->pe == 0)
     einfo (_("%F%P: cannot perform PE operations on non PE output file '%pB'\n"),
           link_info.output_bfd);
This page took 0.023501 seconds and 4 git commands to generate.