diff options
author | Alan Modra <amodra@bigpond.net.au> | 2004-01-03 11:09:07 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2004-01-03 11:09:07 +0000 |
commit | dc09038512881c345ee1935e4b0b1f7c902fa6f4 (patch) | |
tree | 7ebf6cb0211dfee067a129411d4dc30ca826699a /ld/ldfile.c | |
parent | 77e49d2599093da4fa0e5197a23b1b32b2ba252a (diff) | |
download | binutils-redhat-dc09038512881c345ee1935e4b0b1f7c902fa6f4.tar.gz |
* 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.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c index cb0a3c384a..a6f0d603dd 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); } |