* remote-es.c (es1800_child_ops): Don't declare it static.
[deliverable/binutils-gdb.git] / ld / ldfile.c
index f68ed7dc24da470d829dc0222f45460839546e01..6bcca03e529519629673a9930d6f2dc70dda676a 100644 (file)
@@ -26,28 +26,35 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "bfd.h"
 #include "sysdep.h"
-
+#include "ld.h"
 #include "ldmisc.h"
+#include "ldexp.h"
 #include "ldlang.h"
 #include "ldfile.h"
+#include "ldmain.h"
+#include "ldlex.h"
+
 #include <ctype.h>
-/* EXPORT */
+
 char *ldfile_input_filename;
-CONST char * ldfile_output_machine_name ="";
+const char *ldfile_output_machine_name = "";
 unsigned long ldfile_output_machine;
 enum bfd_architecture ldfile_output_architecture;
 
-/* IMPORT */
-
-extern boolean had_script;
-extern boolean trace_file_tries;
-
-
+/* start-sanitize-mpw */
+#ifndef MPW
+/* end-sanitize-mpw */
 #ifdef VMS
 char *slash = "";
 #else
 char *slash = "/";
 #endif
+/* start-sanitize-mpw */
+#else /* MPW */
+/* The MPW path char is a colon. */
+char *slash = ":";
+#endif /* MPW */
+/* end-sanitize-mpw */
 
 
 
@@ -71,7 +78,11 @@ typedef struct search_arch
 static search_arch_type *search_arch_head;
 static search_arch_type **search_arch_tail_ptr = &search_arch_head;
  
-
+static bfd *cached_bfd_openr PARAMS ((const char *attempt,
+                                     lang_input_statement_type *entry));
+static bfd *open_a PARAMS ((char *arch, lang_input_statement_type *entry,
+                           char *lib, char *suffix));
+static FILE *try_open PARAMS ((char *name, char *exten));
 
 void
 ldfile_add_library_path(name)
@@ -86,14 +97,14 @@ char *name;
 }
 
 
-static bfd*
+static bfd *
 cached_bfd_openr(attempt,entry)
-char *attempt;
-lang_input_statement_type  *entry;
+     const char *attempt;
+     lang_input_statement_type  *entry;
 {
   entry->the_bfd = bfd_openr(attempt, entry->target);
   if (trace_file_tries == true ) {
-    info("attempt to open %s %s\n", attempt,
+    info_msg ("attempt to open %s %s\n", attempt,
                (entry->the_bfd == (bfd *)NULL) ? "failed" : "succeeded" );
   }
   return entry->the_bfd;
@@ -101,10 +112,10 @@ lang_input_statement_type  *entry;
 
 static bfd *
 open_a(arch, entry, lib, suffix)
-char *arch;
-lang_input_statement_type *entry;
-char *lib;
-char *suffix;
+     char *arch;
+     lang_input_statement_type *entry;
+     char *lib;
+     char *suffix;
 {
   bfd*desc;
   search_dirs_type *search ;
@@ -188,8 +199,8 @@ lang_input_statement_type *entry;
 
 static FILE *
 try_open(name, exten)
-char *name;
-char *exten;
+     char *name;
+     char *exten;
 {
   FILE *result;
   char buff[1000];
@@ -197,9 +208,9 @@ char *exten;
   result = fopen(name, "r");
   if (trace_file_tries == true) {
     if (result == (FILE *)NULL) {
-      info("can't find ");
+      info_msg ("cannot find ");
     }
-    info("%s\n",name);
+    info_msg ("%s\n",name);
   }
   if (result != (FILE *)NULL) {
     return result;
@@ -210,9 +221,9 @@ char *exten;
     result = fopen(buff, "r");
     if (trace_file_tries == true) {
       if (result == (FILE *)NULL) {
-       info("can't find ");
+       info_msg ("cannot find ");
       }
-      info("%s\n", buff);
+      info_msg ("%s\n", buff);
     }
   }
   return result;
@@ -221,8 +232,8 @@ char *exten;
 /* Try to open NAME; if that fails, look for it in any directories
    specified with -L, without and with EXTEND apppended.  */
 
-static FILE *
-find_a_name(name, extend)
+FILE *
+ldfile_find_command_file(name, extend)
 char *name;
 char *extend;
 {
@@ -250,10 +261,10 @@ ldfile_open_command_file(name)
 char *name;
 {
   FILE *ldlex_input_stack;
-  ldlex_input_stack = find_a_name(name, "");
+  ldlex_input_stack = ldfile_find_command_file(name, "");
 
   if (ldlex_input_stack == (FILE *)NULL) {
-    einfo("%P%F: cannot open load script file %s: %E\n",name);
+    einfo("%P%F: cannot open linker script file %s: %E\n",name);
   }
   lex_push_file(ldlex_input_stack, name);
   
@@ -361,6 +372,6 @@ ldfile_set_output_arch (string)
     ldfile_output_machine_name = arch->printable_name;
   }
   else {
-    einfo("%P%F: Can't represent machine `%s'\n", string);
+    einfo("%P%F: cannot represent machine `%s'\n", string);
   }
 }
This page took 0.029714 seconds and 4 git commands to generate.