* emultempl/pe.em (gld_${EMULATION_NAME}_unrecognized_file): Allow
authorChristopher Faylor <me+cygwin@cgf.cx>
Tue, 28 Sep 2004 15:00:45 +0000 (15:00 +0000)
committerChristopher Faylor <me+cygwin@cgf.cx>
Tue, 28 Sep 2004 15:00:45 +0000 (15:00 +0000)
def_file_parse to handle pe_def_file if NULL and prevent crash with invalid
.def files.

ld/ChangeLog
ld/emultempl/pe.em

index 698b3ad12d880d5ad9a37e6b1db7b0a09c670458..68f359de5b006de7a1aa5189ec28c8a23ea3d8c7 100644 (file)
@@ -1,3 +1,9 @@
+2004-09-27  Filip Navara  <navaraf@reactos.com>
+
+       * emultempl/pe.em (gld_${EMULATION_NAME}_unrecognized_file): Allow
+       def_file_parse to handle pe_def_file if NULL and prevent crash with
+       invalid .def files.
+
 2004-09-27  Alan Modra  <amodra@bigpond.net.au>
 
        * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Enable
index 318eb7c2bf906504ef68dba0187cec8838bed2dc..9ff5c9c9b82461034e1f5cde13d83db6d720a05e 100644 (file)
@@ -1293,10 +1293,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
 
   if (strcmp (ext, ".def") == 0 || strcmp (ext, ".DEF") == 0)
     {
-      if (pe_def_file == 0)
-       pe_def_file = def_file_empty ();
-
-      def_file_parse (entry->filename, pe_def_file);
+      pe_def_file = def_file_parse (entry->filename, pe_def_file);
 
       if (pe_def_file)
        {