aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/pe.em
diff options
context:
space:
mode:
authorChristopher Faylor <me+cygwin@cgf.cx>2004-09-28 15:00:45 +0000
committerChristopher Faylor <me+cygwin@cgf.cx>2004-09-28 15:00:45 +0000
commitf2d3750dc9a4ea6556b6d945d4a3d043a8843572 (patch)
treef733c54ae104e2c95d7cbeff4bd10290d60a6427 /ld/emultempl/pe.em
parent4a2ce54450d1d50799947ccf315c47260b66af9b (diff)
downloadgdb-f2d3750dc9a4ea6556b6d945d4a3d043a8843572.zip
gdb-f2d3750dc9a4ea6556b6d945d4a3d043a8843572.tar.gz
gdb-f2d3750dc9a4ea6556b6d945d4a3d043a8843572.tar.bz2
* 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.
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r--ld/emultempl/pe.em5
1 files changed, 1 insertions, 4 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 318eb7c..9ff5c9c 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -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)
{