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. */
26 * clearing house for ld emulation states
37 extern ld_emulation_xfer_type ld_lnk960_emulation
;
38 extern ld_emulation_xfer_type ld_gld_emulation
;
39 extern ld_emulation_xfer_type ld_vanilla_emulation
;
40 extern ld_emulation_xfer_type ld_gld68k_emulation
;
41 extern ld_emulation_xfer_type ld_gld960_emulation
;
45 ld_emulation_xfer_type
*ld_emulation
;
51 ld_emulation
->hll(name
);
55 void ldemul_syslib(name
)
58 ld_emulation
->syslib(name
);
64 ld_emulation
->after_parse();
70 ld_emulation
->before_parse();
74 ldemul_after_allocation()
76 ld_emulation
->after_allocation();
80 ldemul_before_allocation()
82 if (ld_emulation
->before_allocation
) {
83 ld_emulation
->before_allocation();
89 ldemul_set_output_arch()
91 ld_emulation
->set_output_arch();
95 ldemul_choose_target()
97 return ld_emulation
->choose_target();
103 return ld_emulation
->get_script();
107 ldemul_choose_mode(target
)
110 if (strcmp(target
,LNK960_EMULATION_NAME
)==0) {
111 ld_emulation
= &ld_lnk960_emulation
;
113 else if (strcmp(target
,GLD_EMULATION_NAME
)==0) {
114 ld_emulation
= &ld_gld_emulation
;
116 else if (strcmp(target
,VANILLA_EMULATION_NAME
)==0) {
117 ld_emulation
= &ld_vanilla_emulation
;
119 else if (strcmp(target
,GLD68K_EMULATION_NAME
)==0) {
120 ld_emulation
= &ld_gld68k_emulation
;
122 else if (strcmp(target
,GLD960_EMULATION_NAME
)==0) {
123 ld_emulation
= &ld_gld960_emulation
;
126 info("%P%F unrecognised emulation mode: %s\n",target
);