aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-04-28 18:00:10 +0000
committerNick Clifton <nickc@redhat.com>2001-04-28 18:00:10 +0000
commit884fb58eeb7fd81c0f86443a1ded5ec06548834b (patch)
treee46e0841cdf36fdd70efd9b745ff79379c1ba34e
parentb3992bc715635758994078540cace78561f38a7b (diff)
downloadgdb-884fb58eeb7fd81c0f86443a1ded5ec06548834b.zip
gdb-884fb58eeb7fd81c0f86443a1ded5ec06548834b.tar.gz
gdb-884fb58eeb7fd81c0f86443a1ded5ec06548834b.tar.bz2
Give emulation a chance to process unrecognized file before fatal error is
reported, not after.
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/ldlang.c11
2 files changed, 11 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b4ed510..9bfac5c 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2001-04-28 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
+
+ * ldlang.c (load_symbols): Give emulation a chance
+ to process unrecognized file before fatal error is
+ reported, not after.
+
2001-04-27 Sean McNeil <sean@mcneil.com>
* configure.tgt: Add arm-vxworks target.
diff --git a/ld/ldlang.c b/ld/ldlang.c
index dbe0697..21e540e 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -1449,6 +1449,11 @@ load_symbols (entry, place)
lang_statement_list_type *hold;
err = bfd_get_error ();
+
+ /* See if the emulation has some special knowledge. */
+ if (ldemul_unrecognized_file (entry))
+ return;
+
if (err == bfd_error_file_ambiguously_recognized)
{
char **p;
@@ -1466,13 +1471,7 @@ load_symbols (entry, place)
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
- /* See if the emulation has some special knowledge. */
-
- if (ldemul_unrecognized_file (entry))
- return;
-
/* Try to interpret the file as a linker script. */
-
ldfile_open_command_file (entry->filename);
hold = stat_ptr;