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. */
24 * clearing house for ld emulation states
35 extern ld_emulation_xfer_type ld_lnk960_emulation;
36 extern ld_emulation_xfer_type ld_gldm88kbcs_emulation;
37 extern ld_emulation_xfer_type ld_gld_emulation;
38 extern ld_emulation_xfer_type ld_vanilla_emulation;
39 extern ld_emulation_xfer_type ld_gld68k_emulation;
40 extern ld_emulation_xfer_type ld_gld960_emulation;
41 extern ld_emulation_xfer_type ld_gld29k_emulation;
42 extern ld_emulation_xfer_type ld_gldnews_emulation;
43 extern ld_emulation_xfer_type ld_h8300hds_emulation;
46 ld_emulation_xfer_type *ld_emulation;
52 ld_emulation->hll(name);
56 void ldemul_syslib(name)
59 ld_emulation->syslib(name);
65 ld_emulation->after_parse();
71 ld_emulation->before_parse();
75 ldemul_after_allocation()
77 ld_emulation->after_allocation();
81 ldemul_before_allocation()
83 if (ld_emulation->before_allocation) {
84 ld_emulation->before_allocation();
90 ldemul_set_output_arch()
92 ld_emulation->set_output_arch();
96 ldemul_choose_target()
98 return ld_emulation->choose_target();
104 return ld_emulation->get_script();
108 ldemul_choose_mode(target)
111 if (strcmp(target,LNK960_EMULATION_NAME)==0) {
112 ld_emulation = &ld_lnk960_emulation;
114 else if (strcmp(target,GLD960_EMULATION_NAME)==0) {
115 ld_emulation = &ld_gld960_emulation;
117 else if (strcmp(target,GLDM88KBCS_EMULATION_NAME)==0) {
118 ld_emulation = &ld_gldm88kbcs_emulation;
121 else if (strcmp(target,GLD_EMULATION_NAME)==0) {
122 ld_emulation = &ld_gld_emulation;
124 else if (strcmp(target,VANILLA_EMULATION_NAME)==0) {
125 ld_emulation = &ld_vanilla_emulation;
127 else if (strcmp(target,H8300HDS_EMULATION_NAME)==0) {
128 ld_emulation = &ld_h8300hds_emulation;
131 else if (strcmp(target,GLD68K_EMULATION_NAME)==0) {
132 ld_emulation = &ld_gld68k_emulation;
134 else if (strcmp(target,GLD29K_EMULATION_NAME)==0) {
135 ld_emulation = &ld_gld29k_emulation;
137 else if (strcmp(target,GLDNEWS_EMULATION_NAME)==0) {
138 ld_emulation = &ld_gldnews_emulation;
142 info("%P%F unrecognised emulation mode: %s\n",target);