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. */
25 * Written by Steve Chamberlain steve@cygnus.com
39 extern boolean lang_float_flag;
42 extern enum bfd_architecture ldfile_output_architecture;
43 extern unsigned long ldfile_output_machine;
44 extern char *ldfile_output_machine_name;
46 extern bfd *output_bfd;
50 static void gldm88kbcs_before_parse()
58 gldm88kbcs_after_parse()
64 gldm88kbcs_after_allocation()
70 gldm88kbcs_before_allocation()
77 gldm88kbcs_set_output_arch()
79 /* Set the output architecture and machine if possible */
80 bfd_set_arch_mach(output_bfd, ldfile_output_architecture, ldfile_output_machine);
84 gldm88kbcs_choose_target()
86 char *from_outside = getenv(TARGET_ENVIRON);
87 if (from_outside != (char *)NULL)
89 return GLDM88KBCS_TARGET;
95 info("%S SYSLIB ignored\n");
99 gldm88kbcs_hll(ignore)
102 info("%S HLL ignored\n");
105 static char *gldm88kbcs_script =
106 #include "ldgldm88kbcs.x"
109 static char *gldm88kbcs_script_option_Ur =
110 #include "ldgldm88kbcsUr.x"
113 static char *gldm88kbcs_script_option_r =
114 #include "ldgldm88kbcsr.x"
117 static char *gldm88kbcs_get_script()
119 extern ld_config_type config;
120 if (config.relocateable_output == true &&
121 config.build_constructors == true) {
122 return gldm88kbcs_script_option_Ur;
124 if (config.relocateable_output) {
125 return gldm88kbcs_script_option_r;
128 return gldm88kbcs_script;
130 struct ld_emulation_xfer_struct ld_gldm88kbcs_emulation =
132 gldm88kbcs_before_parse,
135 gldm88kbcs_after_parse,
136 gldm88kbcs_after_allocation,
137 gldm88kbcs_set_output_arch,
138 gldm88kbcs_choose_target,
139 gldm88kbcs_before_allocation,
140 gldm88kbcs_get_script,