Give emulation a chance to process unrecognized file before fatal error is
authorNick Clifton <nickc@redhat.com>
Sat, 28 Apr 2001 18:00:10 +0000 (18:00 +0000)
committerNick Clifton <nickc@redhat.com>
Sat, 28 Apr 2001 18:00:10 +0000 (18:00 +0000)
reported, not after.

ld/ChangeLog
ld/ldlang.c

index b4ed5100ad164b3c981b2c64184d6135732f3034..9bfac5c135be71a4b3f79d82ee7bc0ca56d0cf20 100644 (file)
@@ -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.
index dbe0697d0c87d17bdfcb5b0bc16c503a8cda149e..21e540eb89162cd67f3e5849e91c5d9e4e8a02fb 100644 (file)
@@ -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;