From d29d80f20cde02febef0ca3db72c757acf7e7969 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 11 Jul 2001 08:11:16 +0000 Subject: [PATCH] Check for the output_bfd not having any coff_data structure allocated to it. --- ld/ChangeLog | 5 +++++ ld/emultempl/pe.em | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 997b6f25b05..dd4585e49c9 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2001-07-11 Nick Clifton + + * 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 * emultempl/elf32.em: Do not assuming that contents of the buffer diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 1266fae3f75..1df0609b91a 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -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; -- 2.30.2