Check for the output_bfd not having any coff_data structure allocated to it.

This commit is contained in:
Nick Clifton 2001-07-11 08:11:16 +00:00
parent 2a6ef46975
commit d29d80f20c
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2001-07-11 Nick Clifton <nickc@cambridge.redhat.com>
* emultempl/pe.em (after_open): Check for the output_bfd not
having any coff_data structure allocated to it.
2001-07-09 David O'Brien <obrien@FreeBSD.org>
* emultempl/elf32.em: Do not assuming that contents of the buffer

View File

@ -800,7 +800,7 @@ gld_${EMULATION_NAME}_after_open ()
FIXME: This should be done via a function, rather than by
including an internal BFD header. */
if (!coff_data (output_bfd)->pe)
if (coff_data (output_bfd) == NULL || coff_data (output_bfd)->pe == NULL)
einfo (_("%F%P: PE operations on non PE file.\n"));
pe_data (output_bfd)->pe_opthdr = pe;