aboutsummaryrefslogtreecommitdiff
path: root/ld/ldfile.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-12-11 22:55:55 +0000
committerIan Lance Taylor <ian@airs.com>1993-12-11 22:55:55 +0000
commitfcf276c4958f7cc906ec389f003aa2a713c98528 (patch)
tree6f9a19c2ca8cac0625898fa485a46ffeb17c6382 /ld/ldfile.c
parent2c6635a46f894fc4e3c0ea6a9023f0ae43b3451f (diff)
downloadfsf-binutils-gdb-fcf276c4958f7cc906ec389f003aa2a713c98528.zip
fsf-binutils-gdb-fcf276c4958f7cc906ec389f003aa2a713c98528.tar.gz
fsf-binutils-gdb-fcf276c4958f7cc906ec389f003aa2a713c98528.tar.bz2
Made many changes to eliminate gcc warnings. Made various
cosmetic changes, declared various things in header files, removed various extern declarations from .c files. No substantive changes.
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r--ld/ldfile.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c
index f68ed7d..4c4af01 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -26,23 +26,22 @@ 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 "ldsym.h"
+#include "ldmain.h"
+#include "ldlex.h"
+
#include <ctype.h>
-/* EXPORT */
+
char *ldfile_input_filename;
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;
-
-
#ifdef VMS
char *slash = "";
#else
@@ -93,7 +92,7 @@ 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;
@@ -197,9 +196,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 +209,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 +220,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 +249,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 +360,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);
}
}