aboutsummaryrefslogtreecommitdiff
path: root/ld/ldfile.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-01-03 11:09:07 +0000
committerAlan Modra <amodra@gmail.com>2004-01-03 11:09:07 +0000
commit5e2f15758b3831ad6fa9f8eee34dbefb689a8d68 (patch)
tree7366cf53a1fbbce7793b6b5fa0957dd31789ecdb /ld/ldfile.c
parent386c036baa78260724d16fb2672450b09b684dcb (diff)
downloadgdb-5e2f15758b3831ad6fa9f8eee34dbefb689a8d68.zip
gdb-5e2f15758b3831ad6fa9f8eee34dbefb689a8d68.tar.gz
gdb-5e2f15758b3831ad6fa9f8eee34dbefb689a8d68.tar.bz2
* ldfile.c (ldfile_set_output_arch): Add defarch param.
* ldfile.h (ldfile_set_output_arch): Ditto. * emultempl/aix.em (gld${EMULATION_NAME}_before_parse): Use ldfile_set_output_arch. * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Ditto. * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Ditto. * emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Ditto. * emultempl/mipsecoff.em (gld${EMULATION_NAME}_before_parse): Ditto. * emultempl/pe.em (gld${EMULATION_NAME}_before_parse): Ditto. * emultempl/sunos.em (gld${EMULATION_NAME}_before_parse): Ditto. * ldgram.y: Adjust ldfile_set_output_arch call. * emultempl/armcoff.em (gld${EMULATION_NAME}_before_parse): Ditto. * emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Ditto. * emultempl/armelf_oabi.em (gld${EMULATION_NAME}_before_parse): Ditto. * emultempl/generic.em (gld${EMULATION_NAME}_before_parse): Ditto. * emultempl/gld960c.em (gld960_set_output_arch): Ditto. * emultempl/m68kcoff.em (gld${EMULATION_NAME}_before_parse): Ditto. * emultempl/ticoff.em (gld${EMULATION_NAME}_before_parse): Ditto.
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r--ld/ldfile.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c
index cb0a3c3..a6f0d60 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -1,6 +1,6 @@
/* Linker file opening and searching.
- Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -81,7 +81,7 @@ is_sysrooted_pathname (const char *name, bfd_boolean notsame)
if (! realname)
return FALSE;
-
+
len = strlen (realname);
if (((! notsame && len == ld_canon_sysroot_len)
@@ -246,7 +246,7 @@ ldfile_try_open_bfd (const char *attempt,
if (yylval.bigint.str)
free (yylval.bigint.str);
break;
- }
+ }
token = yylex ();
}
ldlex_popstate ();
@@ -579,7 +579,7 @@ ldfile_add_arch (const char *in_name)
/* Set the output architecture. */
void
-ldfile_set_output_arch (const char *string)
+ldfile_set_output_arch (const char *string, enum bfd_architecture defarch)
{
const bfd_arch_info_type *arch = bfd_scan_arch (string);
@@ -589,8 +589,8 @@ ldfile_set_output_arch (const char *string)
ldfile_output_machine = arch->mach;
ldfile_output_machine_name = arch->printable_name;
}
+ else if (defarch != bfd_arch_unknown)
+ ldfile_output_architecture = defarch;
else
- {
- einfo (_("%P%F: cannot represent machine `%s'\n"), string);
- }
+ einfo (_("%P%F: cannot represent machine `%s'\n"), string);
}