diff options
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index f10557a..839535b 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -3056,7 +3056,11 @@ load_symbols (lang_input_statement_type *entry, /* See if the emulation has some special knowledge. */ if (ldemul_unrecognized_file (entry)) - return true; + { + if (err == bfd_error_file_ambiguously_recognized) + free (matching); + return true; + } if (err == bfd_error_file_ambiguously_recognized) { @@ -3066,6 +3070,7 @@ load_symbols (lang_input_statement_type *entry, " matching formats:"), entry->the_bfd); for (p = matching; *p != NULL; p++) einfo (" %s", *p); + free (matching); einfo ("%F\n"); } else if (err != bfd_error_file_not_recognized |