3 /* Copyright (C) 1991 Free Software Foundation, Inc.
5 This file is part of GLD, the Gnu Linker.
7 GLD is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 1, or (at your option)
12 GLD is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GLD; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
25 Revision 1.1.1.1 1991/03/21 21:28:20 gumby
26 Back from Intel with Steve
28 * Revision 1.1 1991/03/21 21:28:19 gumby
31 * Revision 1.1 1991/03/13 00:48:09 chrisb
34 * Revision 1.4 1991/03/10 09:31:16 rich
36 * Makefile config.h ld-emul.c ld-emul.h ld-gld.c ld-gld960.c
37 * ld-lnk960.c ld.h lddigest.c ldexp.c ldexp.h ldfile.c ldfile.h
38 * ldgram.y ldinfo.h ldlang.c ldlang.h ldlex.h ldlex.l ldmain.c
39 * ldmain.h ldmisc.c ldmisc.h ldsym.c ldsym.h ldversion.c
40 * ldversion.h ldwarn.h ldwrite.c ldwrite.h y.tab.h
42 * As of this round of changes, ld now builds on all hosts of (Intel960)
43 * interest and copy passes my copy test on big endian hosts again.
45 * Revision 1.3 1991/02/22 17:14:55 sac
46 * Added RCS keywords and copyrights
50 * clearing house for ld emulation states
61 extern ld_emulation_xfer_type ld_lnk960_emulation
;
62 extern ld_emulation_xfer_type ld_gld_emulation
;
63 extern ld_emulation_xfer_type ld_gld960_emulation
;
67 ld_emulation_xfer_type
*ld_emulation
;
73 ld_emulation
->hll(name
);
77 void ldemul_syslib(name
)
80 ld_emulation
->syslib(name
);
86 ld_emulation
->after_parse();
92 ld_emulation
->before_parse();
96 ldemul_after_allocation()
98 ld_emulation
->after_allocation();
102 ldemul_before_allocation()
104 if (ld_emulation
->before_allocation
) {
105 ld_emulation
->before_allocation();
111 ldemul_set_output_arch()
113 ld_emulation
->set_output_arch();
117 ldemul_choose_target()
119 return ld_emulation
->choose_target();
125 return ld_emulation
->get_script();
129 ldemul_choose_mode(target
)
132 if (strcmp(target
,LNK960_EMULATION_NAME
)==0) {
133 ld_emulation
= &ld_lnk960_emulation
;
135 else if (strcmp(target
,GLD_EMULATION_NAME
)==0) {
136 ld_emulation
= &ld_gld_emulation
;
138 else if (strcmp(target
,GLD960_EMULATION_NAME
)==0) {
139 ld_emulation
= &ld_gld960_emulation
;
142 info("%P%F unrecognised emulation mode: %s",target
);