1 /* Copyright (C) 1991 Free Software Foundation, Inc.
3 This file is part of GLD, the Gnu Linker.
5 GLD is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 1, or (at your option)
10 GLD is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GLD; see the file COPYING. If not, write to
17 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
22 The controller which tells the gnu linker how to behave like one for
23 the Hitach H8/300 with IEEE records.
35 extern boolean lang_float_flag;
38 extern enum bfd_architecture ldfile_output_architecture;
39 extern unsigned long ldfile_output_machine;
40 extern char *ldfile_output_machine_name;
42 extern bfd *output_bfd;
46 static void h8300hms_before_parse()
48 ldfile_output_architecture = bfd_arch_h8300;
53 h8300hms_after_parse()
59 h8300hms_after_allocation()
65 h8300hms_before_allocation()
72 h8300hms_set_output_arch()
74 /* Set the output architecture and machine if possible */
75 bfd_set_arch_mach(output_bfd,
76 ldfile_output_architecture, ldfile_output_machine);
80 h8300hms_choose_target()
82 char *from_outside = getenv(TARGET_ENVIRON);
83 if (from_outside != (char *)NULL)
85 return H8300HMS_TARGET;
91 info("%S SYSLIB ignored\n");
98 info("%S HLL ignored\n");
101 static char *h8300hms_script =
102 #include "h8300hms.x"
104 static char *h8300hms_script_option_Ur =
105 #include "h8300hms.x"
107 static char *h8300hms_script_option_r =
108 #include "h8300hms.x"
111 static char *h8300hms_get_script()
113 extern ld_config_type config;
114 if (config.relocateable_output == true &&
115 config.build_constructors == true) {
116 return h8300hms_script_option_Ur;
118 if (config.relocateable_output) {
119 return h8300hms_script_option_r;
122 return h8300hms_script;
124 struct ld_emulation_xfer_struct ld_h8300hms_emulation =
126 h8300hms_before_parse,
129 h8300hms_after_parse,
130 h8300hms_after_allocation,
131 h8300hms_set_output_arch,
132 h8300hms_choose_target,
133 h8300hms_before_allocation,