* config/m68k/xm-mpw.h (spin.h): Include.
[binutils.git] / ld / mpw-em.c
1 /* This file is is generated by a shell script.  DO NOT EDIT! */
2
3 /* emulate the original gld for the given mipsidt
4    Copyright (C) 1991, 1993 Free Software Foundation, Inc.
5   Written by Steve Chamberlain steve@cygnus.com
6
7 This file is part of GLD, the Gnu Linker.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
22
23 #define TARGET_IS_mipsidt
24
25 #include "bfd.h"
26 #include "sysdep.h"
27 #include "bfdlink.h"
28
29 #include "ld.h"
30 #include "config.h"
31 #include "ldmain.h"
32 #include "ldemul.h"
33 #include "ldfile.h"
34 #include "ldmisc.h"
35
36 static void gldmipsidt_before_parse PARAMS ((void));
37 static char *gldmipsidt_get_script PARAMS ((int *isfile));
38
39 static void
40 gldmipsidt_before_parse()
41 {
42 #ifndef TARGET_                 /* I.e., if not generic. */
43  ldfile_output_architecture = bfd_arch_mips;
44 #endif /* not TARGET_ */
45 }
46
47 static char *
48 gldmipsidt_get_script(isfile)
49  int *isfile;
50 {                        
51  *isfile = 0;
52
53  if (link_info.relocateable == true && config.build_constructors == true)
54  return "OUTPUT_FORMAT(\"ecoff-bigmips\")\n\
55 ENTRY(start)\n\
56 SECTIONS\n\
57 {\n\
58  .text : {\n\
59  ;\n\
60  *(.init)\n\
61  ;\n\
62  *(.text)\n\
63  *(.fini)\n\
64  ;\n\
65  ;\n\
66  }\n\
67  .rdata : {\n\
68  *(.rdata)\n\
69  }\n\
70  .data : {\n\
71  *(.data)\n\
72  CONSTRUCTORS\n\
73  }\n\
74  .lit8 : {\n\
75  *(.lit8)\n\
76  }\n\
77  .lit4 : {\n\
78  *(.lit4)\n\
79  }\n\
80  .sdata : {\n\
81  *(.sdata)\n\
82  }\n\
83  .sbss : {\n\
84  *(.sbss)\n\
85  *(.scommon)\n\
86  }\n\
87  .bss : {\n\
88  *(.bss)\n\
89  *(COMMON)\n\
90  }\n\
91 }\n\n";
92  else if (link_info.relocateable == true)
93  return "OUTPUT_FORMAT(\"ecoff-bigmips\")\n\
94 ENTRY(start)\n\
95 SECTIONS\n\
96 {\n\
97  .text : {\n\
98  ;\n\
99  *(.init)\n\
100  ;\n\
101  *(.text)\n\
102  *(.fini)\n\
103  ;\n\
104  ;\n\
105  }\n\
106  .rdata : {\n\
107  *(.rdata)\n\
108  }\n\
109  .data : {\n\
110  *(.data)\n\
111  }\n\
112  .lit8 : {\n\
113  *(.lit8)\n\
114  }\n\
115  .lit4 : {\n\
116  *(.lit4)\n\
117  }\n\
118  .sdata : {\n\
119  *(.sdata)\n\
120  }\n\
121  .sbss : {\n\
122  *(.sbss)\n\
123  *(.scommon)\n\
124  }\n\
125  .bss : {\n\
126  *(.bss)\n\
127  *(COMMON)\n\
128  }\n\
129 }\n\n";
130  else if (!config.text_read_only)
131  return "OUTPUT_FORMAT(\"ecoff-bigmips\")\n\
132 ENTRY(start)\n\
133 SECTIONS\n\
134 {\n\
135  .text 0xa0012000 : {\n\
136  _ftext = . ;\n\
137  *(.init)\n\
138  eprol = .;\n\
139  *(.text)\n\
140  *(.fini)\n\
141  etext = .;\n\
142  _etext = .;\n\
143  }\n\
144  .rdata . : {\n\
145  *(.rdata)\n\
146  }\n\
147   _fdata = .;\n\
148  .data . : {\n\
149  *(.data)\n\
150  CONSTRUCTORS\n\
151  }\n\
152   _gp = . + 0x8000;\n\
153  .lit8 . : {\n\
154  *(.lit8)\n\
155  }\n\
156  .lit4 . : {\n\
157  *(.lit4)\n\
158  }\n\
159  .sdata . : {\n\
160  *(.sdata)\n\
161  }\n\
162   edata = .;\n\
163   _edata = .;\n\
164   _fbss = .;\n\
165  .sbss . : {\n\
166  *(.sbss)\n\
167  *(.scommon)\n\
168  }\n\
169  .bss . : {\n\
170  *(.bss)\n\
171  *(COMMON)\n\
172  }\n\
173   end = .;\n\
174   _end = .;\n\
175 }\n\n";
176  else if (!config.magic_demand_paged)
177  return "OUTPUT_FORMAT(\"ecoff-bigmips\")\n\
178 ENTRY(start)\n\
179 SECTIONS\n\
180 {\n\
181  .text 0xa0012000 : {\n\
182  _ftext = . ;\n\
183  *(.init)\n\
184  eprol = .;\n\
185  *(.text)\n\
186  *(.fini)\n\
187  etext = .;\n\
188  _etext = .;\n\
189  }\n\
190  .rdata . : {\n\
191  *(.rdata)\n\
192  }\n\
193   _fdata = .;\n\
194  .data . : {\n\
195  *(.data)\n\
196  CONSTRUCTORS\n\
197  }\n\
198   _gp = . + 0x8000;\n\
199  .lit8 . : {\n\
200  *(.lit8)\n\
201  }\n\
202  .lit4 . : {\n\
203  *(.lit4)\n\
204  }\n\
205  .sdata . : {\n\
206  *(.sdata)\n\
207  }\n\
208   edata = .;\n\
209   _edata = .;\n\
210   _fbss = .;\n\
211  .sbss . : {\n\
212  *(.sbss)\n\
213  *(.scommon)\n\
214  }\n\
215  .bss . : {\n\
216  *(.bss)\n\
217  *(COMMON)\n\
218  }\n\
219   end = .;\n\
220   _end = .;\n\
221 }\n\n";
222  else
223  return "OUTPUT_FORMAT(\"ecoff-bigmips\")\n\
224 ENTRY(start)\n\
225 SECTIONS\n\
226 {\n\
227  .text 0xa0012000 : {\n\
228  _ftext = . ;\n\
229  *(.init)\n\
230  eprol = .;\n\
231  *(.text)\n\
232  *(.fini)\n\
233  etext = .;\n\
234  _etext = .;\n\
235  }\n\
236  .rdata . : {\n\
237  *(.rdata)\n\
238  }\n\
239   _fdata = .;\n\
240  .data . : {\n\
241  *(.data)\n\
242  CONSTRUCTORS\n\
243  }\n\
244   _gp = . + 0x8000;\n\
245  .lit8 . : {\n\
246  *(.lit8)\n\
247  }\n\
248  .lit4 . : {\n\
249  *(.lit4)\n\
250  }\n\
251  .sdata . : {\n\
252  *(.sdata)\n\
253  }\n\
254   edata = .;\n\
255   _edata = .;\n\
256   _fbss = .;\n\
257  .sbss . : {\n\
258  *(.sbss)\n\
259  *(.scommon)\n\
260  }\n\
261  .bss . : {\n\
262  *(.bss)\n\
263  *(COMMON)\n\
264  }\n\
265   end = .;\n\
266   _end = .;\n\
267 }\n\n";
268 }
269
270 struct ld_emulation_xfer_struct ld_mipsidt_emulation = 
271 {
272  gldmipsidt_before_parse,
273  syslib_default,
274  hll_default,
275  after_parse_default,
276  after_allocation_default,
277  set_output_arch_default,
278  ldemul_default_target,
279  before_allocation_default,
280  gldmipsidt_get_script,
281  "mipsidt",
282  "ecoff-bigmips"
283 };
This page took 0.039622 seconds and 4 git commands to generate.