diff options
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r-- | ld/ldfile.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c index a52cfb0..f1c0bdb 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -333,3 +333,20 @@ DEFUN(ldfile_add_arch,(in_name), } #endif + +/* Set the output architecture */ +void +DEFUN(ldfile_set_output_arch,(string), +CONST char *string) +{ + enum bfd_architecture arch; + unsigned long machine; + if (bfd_scan_arch_mach(string, &arch, &machine) == true) { + ldfile_output_architecture = arch; + ldfile_output_machine = machine; + ldfile_output_machine_name = string; + } + else { + info("%P%F: Can't represent machine `%s'\n", string); + } +} |