Back from Intel with Steve
[deliverable/binutils-gdb.git] / ld / ld-emul.c
CommitLineData
2fa0b342
DHW
1
2
3/* Copyright (C) 1991 Free Software Foundation, Inc.
4
5This file is part of GLD, the Gnu Linker.
6
7GLD is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 1, or (at your option)
10any later version.
11
12GLD is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GLD; see the file COPYING. If not, write to
19the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20
21/*
22 $Id$
23
24 $Log$
c074abee
DHW
25 Revision 1.1.1.1 1991/03/21 21:28:20 gumby
26 Back from Intel with Steve
2fa0b342 27
c074abee
DHW
28 * Revision 1.1 1991/03/21 21:28:19 gumby
29 * Initial revision
30 *
2fa0b342
DHW
31 * Revision 1.1 1991/03/13 00:48:09 chrisb
32 * Initial revision
33 *
34 * Revision 1.4 1991/03/10 09:31:16 rich
35 * Modified Files:
36 * Makefile config.h ld-emul.c ld-emul.h ld-gld.c ld-gld960.c
37 * ld-lnk960.c ld.h lddigest.c ldexp.c ldexp.h ldfile.c ldfile.h
38 * ldgram.y ldinfo.h ldlang.c ldlang.h ldlex.h ldlex.l ldmain.c
39 * ldmain.h ldmisc.c ldmisc.h ldsym.c ldsym.h ldversion.c
40 * ldversion.h ldwarn.h ldwrite.c ldwrite.h y.tab.h
41 *
42 * As of this round of changes, ld now builds on all hosts of (Intel960)
43 * interest and copy passes my copy test on big endian hosts again.
44 *
45 * Revision 1.3 1991/02/22 17:14:55 sac
46 * Added RCS keywords and copyrights
47 *
48*/
49/*
50 * clearing house for ld emulation states
51 */
52
53#include "sysdep.h"
54#include "bfd.h"
55
56#include "config.h"
57#include "ld.h"
58#include "ld-emul.h"
59#include "ldmisc.h"
60
61extern ld_emulation_xfer_type ld_lnk960_emulation;
62extern ld_emulation_xfer_type ld_gld_emulation;
63extern ld_emulation_xfer_type ld_gld960_emulation;
64
65
66
67ld_emulation_xfer_type *ld_emulation;
68
69void
70ldemul_hll(name)
71char *name;
72{
73 ld_emulation->hll(name);
74}
75
76
77void ldemul_syslib(name)
78char *name;
79{
80 ld_emulation->syslib(name);
81}
82
83void
84ldemul_after_parse()
85{
86 ld_emulation->after_parse();
87}
88
89void
90ldemul_before_parse()
91{
92 ld_emulation->before_parse();
93}
94
95void
96ldemul_after_allocation()
97{
98 ld_emulation->after_allocation();
99}
100
101void
102ldemul_before_allocation()
103{
104 if (ld_emulation->before_allocation) {
105 ld_emulation->before_allocation();
106 }
107}
108
109
110void
111ldemul_set_output_arch()
112{
113 ld_emulation->set_output_arch();
114}
115
116char *
117ldemul_choose_target()
118{
119 return ld_emulation->choose_target();
120}
121
122char *
123ldemul_get_script()
124{
125 return ld_emulation->get_script();
126}
127
128void
129ldemul_choose_mode(target)
130char *target;
131{
132 if (strcmp(target,LNK960_EMULATION_NAME)==0) {
133 ld_emulation = &ld_lnk960_emulation;
134 }
135 else if (strcmp(target,GLD_EMULATION_NAME)==0) {
136 ld_emulation = &ld_gld_emulation;
137 }
138 else if (strcmp(target,GLD960_EMULATION_NAME)==0) {
139 ld_emulation = &ld_gld960_emulation;
140 }
141 else {
142 info("%P%F unrecognised emulation mode: %s",target);
143 }
144}
145
146
147
This page took 0.026534 seconds and 4 git commands to generate.