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 1991/03/21 21:28:19 gumby
28 * Revision 1.1 1991/03/13 00:48:09 chrisb
31 * Revision 1.4 1991/03/10 09:31:16 rich
33 * Makefile config.h ld-emul.c ld-emul.h ld-gld.c ld-gld960.c
34 * ld-lnk960.c ld.h lddigest.c ldexp.c ldexp.h ldfile.c ldfile.h
35 * ldgram.y ldinfo.h ldlang.c ldlang.h ldlex.h ldlex.l ldmain.c
36 * ldmain.h ldmisc.c ldmisc.h ldsym.c ldsym.h ldversion.c
37 * ldversion.h ldwarn.h ldwrite.c ldwrite.h y.tab.h
39 * As of this round of changes, ld now builds on all hosts of (Intel960)
40 * interest and copy passes my copy test on big endian hosts again.
42 * Revision 1.3 1991/02/22 17:14:55 sac
43 * Added RCS keywords and copyrights
47 * clearing house for ld emulation states
58 extern ld_emulation_xfer_type ld_lnk960_emulation;
59 extern ld_emulation_xfer_type ld_gld_emulation;
60 extern ld_emulation_xfer_type ld_gld960_emulation;
64 ld_emulation_xfer_type *ld_emulation;
70 ld_emulation->hll(name);
74 void ldemul_syslib(name)
77 ld_emulation->syslib(name);
83 ld_emulation->after_parse();
89 ld_emulation->before_parse();
93 ldemul_after_allocation()
95 ld_emulation->after_allocation();
99 ldemul_before_allocation()
101 if (ld_emulation->before_allocation) {
102 ld_emulation->before_allocation();
108 ldemul_set_output_arch()
110 ld_emulation->set_output_arch();
114 ldemul_choose_target()
116 return ld_emulation->choose_target();
122 return ld_emulation->get_script();
126 ldemul_choose_mode(target)
129 if (strcmp(target,LNK960_EMULATION_NAME)==0) {
130 ld_emulation = &ld_lnk960_emulation;
132 else if (strcmp(target,GLD_EMULATION_NAME)==0) {
133 ld_emulation = &ld_gld_emulation;
135 else if (strcmp(target,GLD960_EMULATION_NAME)==0) {
136 ld_emulation = &ld_gld960_emulation;
139 info("%P%F unrecognised emulation mode: %s",target);