dump the obsolete INSTALL.
[deliverable/binutils-gdb.git] / ld / ld-emul.c
CommitLineData
2fa0b342
DHW
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/*
99fe4553
SC
20 * $Id$
21 */
22
2fa0b342
DHW
23/*
24 * clearing house for ld emulation states
25 */
26
27#include "sysdep.h"
28#include "bfd.h"
29
30#include "config.h"
31#include "ld.h"
32#include "ld-emul.h"
33#include "ldmisc.h"
34
35extern ld_emulation_xfer_type ld_lnk960_emulation;
a37cc0c0 36extern ld_emulation_xfer_type ld_gldm88kbcs_emulation;
2fa0b342 37extern ld_emulation_xfer_type ld_gld_emulation;
1418c83b 38extern ld_emulation_xfer_type ld_vanilla_emulation;
7ca04d28 39extern ld_emulation_xfer_type ld_gld68k_emulation;
2fa0b342
DHW
40extern ld_emulation_xfer_type ld_gld960_emulation;
41
42
43
44ld_emulation_xfer_type *ld_emulation;
45
46void
47ldemul_hll(name)
48char *name;
49{
50 ld_emulation->hll(name);
51}
52
53
54void ldemul_syslib(name)
55char *name;
56{
57 ld_emulation->syslib(name);
58}
59
60void
61ldemul_after_parse()
62{
63 ld_emulation->after_parse();
64}
65
66void
67ldemul_before_parse()
68{
69 ld_emulation->before_parse();
70}
71
72void
73ldemul_after_allocation()
74{
75 ld_emulation->after_allocation();
76}
77
78void
79ldemul_before_allocation()
80{
81 if (ld_emulation->before_allocation) {
82 ld_emulation->before_allocation();
83 }
84}
85
86
87void
88ldemul_set_output_arch()
89{
90 ld_emulation->set_output_arch();
91}
92
93char *
94ldemul_choose_target()
95{
96 return ld_emulation->choose_target();
97}
98
99char *
100ldemul_get_script()
101{
102 return ld_emulation->get_script();
103}
104
105void
106ldemul_choose_mode(target)
107char *target;
108{
109 if (strcmp(target,LNK960_EMULATION_NAME)==0) {
110 ld_emulation = &ld_lnk960_emulation;
111 }
99fe4553
SC
112 else if (strcmp(target,GLD960_EMULATION_NAME)==0) {
113 ld_emulation = &ld_gld960_emulation;
114 }
a37cc0c0
SC
115else if (strcmp(target,GLDM88KBCS_EMULATION_NAME)==0) {
116 ld_emulation = &ld_gldm88kbcs_emulation;
117}
99fe4553 118#ifndef GNU960
2fa0b342
DHW
119 else if (strcmp(target,GLD_EMULATION_NAME)==0) {
120 ld_emulation = &ld_gld_emulation;
121 }
1418c83b
SC
122 else if (strcmp(target,VANILLA_EMULATION_NAME)==0) {
123 ld_emulation = &ld_vanilla_emulation;
124 }
7ca04d28
SC
125 else if (strcmp(target,GLD68K_EMULATION_NAME)==0) {
126 ld_emulation = &ld_gld68k_emulation;
127 }
99fe4553 128#endif
2fa0b342 129 else {
de7c1ff6 130 info("%P%F unrecognised emulation mode: %s\n",target);
2fa0b342
DHW
131 }
132}
133
134
135
This page took 0.041385 seconds and 4 git commands to generate.