Initial revision
[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 1991/03/21 21:28:19 gumby
26 Initial revision
27
28 * Revision 1.1 1991/03/13 00:48:09 chrisb
29 * Initial revision
30 *
31 * Revision 1.4 1991/03/10 09:31:16 rich
32 * Modified Files:
33 * Makefile config.h ld-emul.c ld-emul.h ld-gld.c ld-gld960.c
34 * ld-lnk960.c ld.h lddigest.c ldexp.c ldexp.h ldfile.c ldfile.h
35 * ldgram.y ldinfo.h ldlang.c ldlang.h ldlex.h ldlex.l ldmain.c
36 * ldmain.h ldmisc.c ldmisc.h ldsym.c ldsym.h ldversion.c
37 * ldversion.h ldwarn.h ldwrite.c ldwrite.h y.tab.h
38 *
39 * As of this round of changes, ld now builds on all hosts of (Intel960)
40 * interest and copy passes my copy test on big endian hosts again.
41 *
42 * Revision 1.3 1991/02/22 17:14:55 sac
43 * Added RCS keywords and copyrights
44 *
45 */
46 /*
47 * clearing house for ld emulation states
48 */
49
50 #include "sysdep.h"
51 #include "bfd.h"
52
53 #include "config.h"
54 #include "ld.h"
55 #include "ld-emul.h"
56 #include "ldmisc.h"
57
58 extern ld_emulation_xfer_type ld_lnk960_emulation;
59 extern ld_emulation_xfer_type ld_gld_emulation;
60 extern ld_emulation_xfer_type ld_gld960_emulation;
61
62
63
64 ld_emulation_xfer_type *ld_emulation;
65
66 void
67 ldemul_hll(name)
68 char *name;
69 {
70 ld_emulation->hll(name);
71 }
72
73
74 void ldemul_syslib(name)
75 char *name;
76 {
77 ld_emulation->syslib(name);
78 }
79
80 void
81 ldemul_after_parse()
82 {
83 ld_emulation->after_parse();
84 }
85
86 void
87 ldemul_before_parse()
88 {
89 ld_emulation->before_parse();
90 }
91
92 void
93 ldemul_after_allocation()
94 {
95 ld_emulation->after_allocation();
96 }
97
98 void
99 ldemul_before_allocation()
100 {
101 if (ld_emulation->before_allocation) {
102 ld_emulation->before_allocation();
103 }
104 }
105
106
107 void
108 ldemul_set_output_arch()
109 {
110 ld_emulation->set_output_arch();
111 }
112
113 char *
114 ldemul_choose_target()
115 {
116 return ld_emulation->choose_target();
117 }
118
119 char *
120 ldemul_get_script()
121 {
122 return ld_emulation->get_script();
123 }
124
125 void
126 ldemul_choose_mode(target)
127 char *target;
128 {
129 if (strcmp(target,LNK960_EMULATION_NAME)==0) {
130 ld_emulation = &ld_lnk960_emulation;
131 }
132 else if (strcmp(target,GLD_EMULATION_NAME)==0) {
133 ld_emulation = &ld_gld_emulation;
134 }
135 else if (strcmp(target,GLD960_EMULATION_NAME)==0) {
136 ld_emulation = &ld_gld960_emulation;
137 }
138 else {
139 info("%P%F unrecognised emulation mode: %s",target);
140 }
141 }
142
143
144
This page took 0.037534 seconds and 5 git commands to generate.