Check for the output_bfd not having any coff_data structure allocated to it.
authorNick Clifton <nickc@redhat.com>
Wed, 11 Jul 2001 08:11:16 +0000 (08:11 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 11 Jul 2001 08:11:16 +0000 (08:11 +0000)
ld/ChangeLog
ld/emultempl/pe.em

index 997b6f25b0523c53a02fd573f4b2bc92164dc906..dd4585e49c9ed37737148a13f24927628022c2e8 100644 (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
index 1266fae3f7555dd971723a7a589d875d9f82ed0d..1df0609b91a9eff24df00483ae74d777e076e0d1 100644 (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;