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. */
23 Revision 1.3 1991/04/14 03:22:11 steve
24 checkpoint before a merge
26 * Revision 1.2 1991/03/22 23:02:30 steve
27 * Brought up to sync with Intel again.
29 * Revision 1.3 1991/03/16 22:27:24 rich
32 * Revision 1.2 1991/03/15 18:45:55 rich
35 * Revision 1.1 1991/03/13 00:48:12 chrisb
38 * Revision 1.4 1991/03/10 09:31:19 rich
40 * Makefile config.h ld-emul.c ld-emul.h ld-gld.c ld-gld960.c
41 * ld-lnk960.c ld.h lddigest.c ldexp.c ldexp.h ldfile.c ldfile.h
42 * ldgram.y ldinfo.h ldlang.c ldlang.h ldlex.h ldlex.l ldmain.c
43 * ldmain.h ldmisc.c ldmisc.h ldsym.c ldsym.h ldversion.c
44 * ldversion.h ldwarn.h ldwrite.c ldwrite.h y.tab.h
46 * As of this round of changes, ld now builds on all hosts of (Intel960)
47 * interest and copy passes my copy test on big endian hosts again.
49 * Revision 1.3 1991/02/22 17:14:57 sac
50 * Added RCS keywords and copyrights
55 * emulate the Intels port of gld
71 extern char *output_filename
;
72 extern boolean lang_float_flag
;
75 extern enum bfd_architecture ldfile_output_architecture
;
76 extern unsigned long ldfile_output_machine
;
77 extern char *ldfile_output_machine_name
;
79 extern bfd
*output_bfd
;
83 static void gld960_before_parse()
86 env
= getenv("G960LIB");
88 ldfile_add_library_path(env
);
90 env
= getenv("G960BASE");
92 ldfile_add_library_path(concat(env
,"/lib",""));
94 ldfile_output_architecture
= bfd_arch_i960
;
105 gld960_after_allocation()
111 gld960_before_allocation()
118 gld960_set_output_arch()
120 /* Set the output architecture and machine if possible */
121 unsigned long machine
= 0;
122 bfd_set_arch_mach(output_bfd
, ldfile_output_architecture
, machine
);
126 gld960_choose_target()
128 char *from_outside
= getenv(TARGET_ENVIRON
);
129 output_filename
= "b.out";
131 if (from_outside
!= (char *)NULL
)
133 return GLD960_TARGET
;
139 info("%S SYSLIB ignored\n");
145 info("%S HLL ignored\n");
149 static char *script
=
150 #include "ld-gld960.x"
160 struct ld_emulation_xfer_struct ld_gld960_emulation
=
166 gld960_after_allocation
,
167 gld960_set_output_arch
,
168 gld960_choose_target
,
169 gld960_before_allocation
,