aboutsummaryrefslogtreecommitdiff
path: root/ld/ldfile.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1994-01-26 04:17:05 +0000
committerStan Shebs <shebs@codesourcery.com>1994-01-26 04:17:05 +0000
commitb5b2c886499ed688cf7a87faad7088ade34958ef (patch)
treef15be6b0e732777816a7e085db07bcafb9435c44 /ld/ldfile.c
parent42d11afacc93ca7b5c7078c6e896fb03c35b30c1 (diff)
downloadgdb-b5b2c886499ed688cf7a87faad7088ade34958ef.zip
gdb-b5b2c886499ed688cf7a87faad7088ade34958ef.tar.gz
gdb-b5b2c886499ed688cf7a87faad7088ade34958ef.tar.bz2
Tue Jan 25 19:54:19 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-config.in: New file, MPW configuration fragment. * mpw-build.in: New file, MPW build script fragment. * mpw-make.in: New file, MPW makefile fragment. (This file is semi-automatically generated from Makefile.in.) * ldfile.c (slash): If MPW, set to `:'. * ldlex.l (TRUE_FALSE_ALREADY_DEFINED): If MPW, set this to prevent redefinition errors.
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r--ld/ldfile.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c
index 4c4af01..6bcca03 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -31,22 +31,30 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "ldexp.h"
#include "ldlang.h"
#include "ldfile.h"
-#include "ldsym.h"
#include "ldmain.h"
#include "ldlex.h"
#include <ctype.h>
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;
+/* 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 */
@@ -70,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)
@@ -85,10 +97,10 @@ 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 ) {
@@ -100,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 ;
@@ -187,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];