keep new files; get rid of trailing spaces after sh-support file names
[deliverable/binutils-gdb.git] / ld / ldemul.c
CommitLineData
f177a611
JG
1/* Copyright (C) 1991 Free Software Foundation, Inc.
2
3This file is part of GLD, the Gnu Linker.
4
5GLD is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation; either version 1, or (at your option)
8any later version.
9
10GLD is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with GLD; see the file COPYING. If not, write to
17the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
18
19/*
20 * $Id$
21 */
22
23/*
24 * clearing house for ld emulation states
25 */
26
27#include "bfd.h"
28#include "sysdep.h"
29
30#include "config.h"
31#include "ld.h"
32#include "ldemul.h"
33#include "ldmisc.h"
34
35extern ld_emulation_xfer_type ld_lnk960_emulation;
36extern ld_emulation_xfer_type ld_gldm88kbcs_emulation;
37extern ld_emulation_xfer_type ld_gld_emulation;
38extern ld_emulation_xfer_type ld_vanilla_emulation;
39extern ld_emulation_xfer_type ld_gld68k_emulation;
40extern ld_emulation_xfer_type ld_gld960_emulation;
41extern ld_emulation_xfer_type ld_gld29k_emulation;
42extern ld_emulation_xfer_type ld_gldnews_emulation;
43extern ld_emulation_xfer_type ld_h8300hds_emulation;
44
45
46ld_emulation_xfer_type *ld_emulation;
47
48void
49ldemul_hll(name)
50char *name;
51{
52 ld_emulation->hll(name);
53}
54
55
56void ldemul_syslib(name)
57char *name;
58{
59 ld_emulation->syslib(name);
60}
61
62void
63ldemul_after_parse()
64{
65 ld_emulation->after_parse();
66}
67
68void
69ldemul_before_parse()
70{
71 ld_emulation->before_parse();
72}
73
74void
75ldemul_after_allocation()
76{
77 ld_emulation->after_allocation();
78}
79
80void
81ldemul_before_allocation()
82{
83 if (ld_emulation->before_allocation) {
84 ld_emulation->before_allocation();
85 }
86}
87
88
89void
90ldemul_set_output_arch()
91{
92 ld_emulation->set_output_arch();
93}
94
95char *
96ldemul_choose_target()
97{
98 return ld_emulation->choose_target();
99}
100
101char *
102ldemul_get_script()
103{
104 return ld_emulation->get_script();
105}
106
107void
108ldemul_choose_mode(target)
109char *target;
110{
111 if (strcmp(target,LNK960_EMULATION_NAME)==0) {
112 ld_emulation = &ld_lnk960_emulation;
113 }
114 else if (strcmp(target,GLD960_EMULATION_NAME)==0) {
115 ld_emulation = &ld_gld960_emulation;
116 }
117 else if (strcmp(target,GLDM88KBCS_EMULATION_NAME)==0) {
118 ld_emulation = &ld_gldm88kbcs_emulation;
119 }
120#ifndef GNU960
121 else if (strcmp(target,GLD_EMULATION_NAME)==0) {
122 ld_emulation = &ld_gld_emulation;
123 }
124 else if (strcmp(target,VANILLA_EMULATION_NAME)==0) {
125 ld_emulation = &ld_vanilla_emulation;
126 }
127 else if (strcmp(target,H8300HDS_EMULATION_NAME)==0) {
128 ld_emulation = &ld_h8300hds_emulation;
129 }
130
131 else if (strcmp(target,GLD68K_EMULATION_NAME)==0) {
132 ld_emulation = &ld_gld68k_emulation;
133 }
134 else if (strcmp(target,GLD29K_EMULATION_NAME)==0) {
135 ld_emulation = &ld_gld29k_emulation;
136 }
137 else if (strcmp(target,GLDNEWS_EMULATION_NAME)==0) {
138 ld_emulation = &ld_gldnews_emulation;
139 }
140#endif
141 else {
142 info("%P%F unrecognised emulation mode: %s\n",target);
143 }
144}
145
146
147
This page took 0.060638 seconds and 4 git commands to generate.