aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/ose/gcc_lm_x86_4.4.3.lcf
blob: d64fd9160416b30a9b2b9de483043b5289a04e92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
/* COPYRIGHT-ENEA-EXAMPLE-R2 *
**************************************************************************
* Copyright (C) 2010 by Enea Software AB.
* All rights reserved.
*
* This Example is furnished under a Software License Agreement and
* may be used only in accordance with the terms of such agreement.
* No title to and ownership of the Example is hereby transferred.
*
* The information in this Example is subject to change
* without notice and should not be construed as a commitment
* by Enea Software AB.
*
* DISCLAIMER
* This Example is delivered "AS IS", consequently
* Enea Software AB makes no representations or warranties,
* expressed or implied, for the Example.
**************************************************************************
* COPYRIGHT-END */

OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH("i386")

ENTRY("crt0_lm")

MEMORY
{
	rom   	 : ORIGIN = 0x01000000, LENGTH = 0x01000000
	ram   	 : ORIGIN = 0x02000000, LENGTH = 0x01000000
}

PHDRS
{
	ph_conf PT_LOAD ;
	ph_rom PT_LOAD ;
	ph_ram PT_LOAD ;
}

SECTIONS
{
/*---------------------------------------------------------------------------
 *		Read-only area
 *-------------------------------------------------------------------------*/

	/* Code section. */
	.text :
	{
		*(.text_first)
		*(.text)
		*(.text.*)
		*(.stub)
		*(oscode)
		*(.init*)
		*(.fini*)
		*(.gnu.warning)
		*(.gnu.linkonce.t.*)
		*(.glue_7t)
		*(.glue_7)
	} > rom :ph_rom = 0


	.ose_sfk_biosentry :
	{
		*(.ose_sfk_biosentry)
        } > rom :ph_rom

	/* C++ constructor section. */
	.ctors :
	{
		__CTOR_LIST__ = .;
		*(.ctors)
		*(SORT(.ctors.*))
		__CTOR_END__ = .;
	} > rom :ph_rom

	/* C++ destructor section. */
	.dtors :
	{
		__DTOR_LIST__ = .;
		*(.dtors)
		*(SORT(.dtors.*))
		__DTOR_END__ = .;
	} > rom :ph_rom

	/* OSE symbols section. */
	OSESYMS :
	{
		*(.osesyms)
	} > rom :ph_rom

	.plt :
	{
             *(.plt)
             *(.iplt)
	} > rom :ph_rom


	/* Read-only data section. */
	.rodata :
	{
		*(.rodata)
		*(.rodata.*)
		*(.gnu.linkonce.r.*)
	} > rom :ph_rom

	/* C++ exception handling section. */
	.eh_frame :
	{
		__EH_FRAME_BEGIN__ = .;
		*(.eh_frame)
		LONG(0)
		__EH_FRAME_END__ = .;
	} > rom :ph_rom

	/* C++ exception handling section. */
	.gcc_except_table :
	{
		*(.gcc_except_table)
	} > rom :ph_rom

	/* PowerPC EABI initialized read-only data section. */
	.sdata2 :
	{
		*(.sdata2)
		*(.sdata2.*)
		*(.gnu.linkonce.s2.*)
	} > rom :ph_rom

	/* PowerPC EABI uninitialized read-only data section. */
	.sbss2 :
	{
		*(.sbss2)
		*(.sbss2.*)
		*(.gnu.linkonce.sb2.*)
	} > rom :ph_rom

	/* Dynamic relocations */
	.rel.dyn :
	{
		*(.rel.init)
		*(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
		*(.rel.fini)
		*(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
		*(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
		*(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
		*(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
		*(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
		*(.rel.ctors)
		*(.rel.dtors)
		*(.rel.got)
		*(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
		*(.rel.ifunc)
	} > rom :ph_rom

/*---------------------------------------------------------------------------
 *		Load module configuration area
 *-------------------------------------------------------------------------*/

	/* Load module configuration section. */
	LMCONF :
	{
		obj/?*?/ose_confd.o(.rodata)
		*(LMCONF)
	} > rom :ph_conf


/*---------------------------------------------------------------------------
 *		Read-write area
 *-------------------------------------------------------------------------*/

	/*-------------------------------------------------------------------
	 * Initialized data (copied by PM  )
	 *-----------------------------------------------------------------*/

	/* Data section. */
	.data :
	{
		LONG(0xDEADBABE)
		*(.data)
		*(.data.*)
		*(.gnu.linkonce.d.*)
		SORT(CONSTRUCTORS)
		. = ALIGN(0x10);
	} > ram :ph_ram = 0

	.got :
	{
		*(.got.plt)
		*(.got)
	} > rom :ph_ram

	/* Global offset table for dynamically linked procedures. */
	.got.plt :
	{
		*(.got.plt)
		*(.igot.plt)
	} > rom :ph_ram

	/* Small data section. */
        .sdata2         :
	{
	        _SDA2_BASE_ = .;
	        *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
	}> ram :ph_ram
	.sdata :
	{
	        _SDA_BASE_ = .;
		*(.sdata)
		*(.sdata.*)
		*(.gnu.linkonce.s.*)
	} > ram :ph_ram

	/*-------------------------------------------------------------------
	 * Uninitialized data (cleared by PM  )
	 *-----------------------------------------------------------------*/

	/* Small bss section. */
	.sbss :
	{
		*(.sbss)
		*(.sbss.*)
		*(.scommon)
		*(.gnu.linkonce.sb.*)
	} > ram :ph_ram

	/* Bss section. */
	.bss (NOLOAD) :
	{
		*(.bss)
		*(.bss.*)
		*(COMMON)
		*(.gnu.linkonce.b.*)
		*(.osvars)
	} > ram :ph_ram

	/* Ignore unwanted sections that are not used in OSE. */
	.ignore (NOLOAD) :
	{
		*(.rel.dyn)
	} > ram :ph_ram

/*---------------------------------------------------------------------------
 *		Debug information
 *-------------------------------------------------------------------------*/

	/*
	 * DWARF debug sections.
	 */

	/* DWARF 1 */
	.debug           0 : { *(.debug) }
	.line            0 : { *(.line) }
	/* GNU DWARF 1 extensions */
	.debug_srcinfo   0 : { *(.debug_srcinfo) }
	.debug_sfnames   0 : { *(.debug_sfnames) }
	/* DWARF 1.1 and DWARF 2 */
	.debug_aranges   0 : { *(.debug_aranges) }
	.debug_pubnames  0 : { *(.debug_pubnames) }
	/* DWARF 2 */
	.debug_info      0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
	.debug_abbrev    0 : { *(.debug_abbrev) }
	.debug_line      0 : { *(.debug_line) }
	.debug_frame     0 : { *(.debug_frame) }
	.debug_str       0 : { *(.debug_str) }
	.debug_loc       0 : { *(.debug_loc) }
	.debug_macinfo   0 : { *(.debug_macinfo) }
	/* SGI/MIPS DWARF 2 extensions */
	.debug_weaknames 0 : { *(.debug_weaknames) }
	.debug_funcnames 0 : { *(.debug_funcnames) }
	.debug_typenames 0 : { *(.debug_typenames) }
	.debug_varnames  0 : { *(.debug_varnames) }

}

/* Symbols used by DDA. */
__OSESYMS_START    = ADDR(OSESYMS);
__OSESYMS_END      = ADDR(OSESYMS) + SIZEOF(OSESYMS);