Back from Intel with Steve
[deliverable/binutils-gdb.git] / ld / ld-emul.c
1
2
3 /* Copyright (C) 1991 Free Software Foundation, Inc.
4
5 This file is part of GLD, the Gnu Linker.
6
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)
10 any later version.
11
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.
16
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. */
20
21 /*
22 $Id$
23
24 $Log$
25 Revision 1.1.1.1 1991/03/21 21:28:20 gumby
26 Back from Intel with Steve
27
28 * Revision 1.1 1991/03/21 21:28:19 gumby
29 * Initial revision
30 *
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
61 extern ld_emulation_xfer_type ld_lnk960_emulation;
62 extern ld_emulation_xfer_type ld_gld_emulation;
63 extern ld_emulation_xfer_type ld_gld960_emulation;
64
65
66
67 ld_emulation_xfer_type *ld_emulation;
68
69 void
70 ldemul_hll(name)
71 char *name;
72 {
73 ld_emulation->hll(name);
74 }
75
76
77 void ldemul_syslib(name)
78 char *name;
79 {
80 ld_emulation->syslib(name);
81 }
82
83 void
84 ldemul_after_parse()
85 {
86 ld_emulation->after_parse();
87 }
88
89 void
90 ldemul_before_parse()
91 {
92 ld_emulation->before_parse();
93 }
94
95 void
96 ldemul_after_allocation()
97 {
98 ld_emulation->after_allocation();
99 }
100
101 void
102 ldemul_before_allocation()
103 {
104 if (ld_emulation->before_allocation) {
105 ld_emulation->before_allocation();
106 }
107 }
108
109
110 void
111 ldemul_set_output_arch()
112 {
113 ld_emulation->set_output_arch();
114 }
115
116 char *
117 ldemul_choose_target()
118 {
119 return ld_emulation->choose_target();
120 }
121
122 char *
123 ldemul_get_script()
124 {
125 return ld_emulation->get_script();
126 }
127
128 void
129 ldemul_choose_mode(target)
130 char *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.033586 seconds and 5 git commands to generate.