1 cat >ld__${EMULATION_NAME}.c <<EOF
2 /* Copyright (C) 1991 Free Software Foundation, Inc.
4 This file is part of GLD, the Gnu Linker.
6 GLD is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 1, or (at your option)
11 GLD is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GLD; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 * emulate the Intels port of gld
37 extern char *output_filename;
38 extern boolean lang_float_flag;
41 extern enum bfd_architecture ldfile_output_architecture;
42 extern unsigned long ldfile_output_machine;
43 extern char *ldfile_output_machine_name;
45 extern bfd *output_bfd;
54 static char *env_variables[] = { "G960LIB", "G960BASE", 0 };
58 for ( p = env_variables; *p; p++ ){
59 env = (char *) getenv(*p);
61 ldfile_add_library_path(concat(env,"/lib/libbout",""));
64 ldfile_output_architecture = bfd_arch_i960;
67 #else /* not GNU960 */
69 static void gld960_before_parse()
72 env = getenv("G960LIB");
74 ldfile_add_library_path(env);
76 env = getenv("G960BASE");
78 ldfile_add_library_path(concat(env,"/lib",""));
80 ldfile_output_architecture = bfd_arch_i960;
87 gld960_set_output_arch()
89 bfd_set_arch_mach(output_bfd, ldfile_output_architecture, bfd_mach_i960_core);
93 gld960_choose_target()
97 output_filename = "b.out";
98 return bfd_make_targ_name(BFD_BOUT_FORMAT, 0);
102 char *from_outside = getenv(TARGET_ENVIRON);
103 output_filename = "b.out";
105 if (from_outside != (char *)NULL)
112 static char *script =
117 static char *script_reloc =
125 extern ld_config_type config;
126 if (config.relocateable_output)
132 struct ld_emulation_xfer_struct ld_gld960_emulation =
138 after_allocation_default,
139 gld960_set_output_arch,
140 gld960_choose_target,
141 before_allocation_default,