aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/ose/gcc_lm_x86_4.6.3.lcf
blob: bb357afcb1e6be28d1f079dc3558fd9676a024c1 (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
/*******************************************************************************
 * gcc_lm_x86.lcf: GCC linker control file for x86 load modules
 * @(#) $FilePath:   /vobs/ose5/system/refsys/compilers/gcc_lm_x86.lcf  $
 * @(#) $FileRevision:   /main/tb_current_ose5/9  $
 * $Author:   rand  $$Date:   10/29/12 17:45:04  $
 * $Copyright:   (C) 2006 by Enea AB. All rights reserved.  $
 ******************************************************************************/

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

ENTRY("crt0_lm")

/* Note:
 * You may have to increase the length of the "rom" memory region below
 * depending on the size of the code and data in your load module.
 */

MEMORY
{
	conf : ORIGIN = 0x00300000, LENGTH = 0x00001000
	rom  : ORIGIN = 0x00000000, LENGTH = 0x00300000
}

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

SECTIONS
{
/*---------------------------------------------------------------------------
 *		Load module configuration area
 *-------------------------------------------------------------------------*/

	/* Load module configuration section. */
	LMCONF :
	{
		dummy = ALIGN(0x10000);
		*/?*?/*ose_confd.o(LMCONF*)
		*(LMCONF*)
		*ose_confd.o(.rodata)
	} > conf :ph_conf

/*---------------------------------------------------------------------------
 *		Read-only area
 *-------------------------------------------------------------------------*/

	/* Init section. */
	.init :
	{
		KEEP(*(.init))
	} > rom :ph_rom = 0x90909090

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

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

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

	/* Procedure linkage table section. */
	.plt :
	{
		*(.plt)
		*(.iplt)
	} > 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

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

	/* 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

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

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

	/* Data section. */
	.data :
	{
		*(.data)
		*(.data.*)
		*(.gnu.linkonce.d.*)
		SORT(CONSTRUCTORS)
	} > rom :ph_ram

	/* Global offset table section. */
	.got :
	{
		*(.got.plt)
		*(.got)
	} > rom :ph_ram

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

	/* SFK BIOS entry section. */
	.ose_sfk_biosentry :
	{
		*(.ose_sfk_biosentry)
	} > rom :ph_ram

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

	/* Small data section. */
	.sdata ALIGN(0x10) :
	{
		PROVIDE (_SDA_BASE_ = .);
		*(.sdata)
		*(.sdata.*)
		*(.gnu.linkonce.s.*)
	} > rom :ph_ram

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

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

	/* Small bss section. */
	.sbss ALIGN(0x10) :
	{
		*(.sbss)
		*(.sbss.*)
		*(.scommon)
		*(.gnu.linkonce.sb.*)
	} > rom :ph_ram

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

	/*
	 * Stabs debug sections.
	 */

	.stab            0 : { *(.stab) }
	.stabstr         0 : { *(.stabstr) }
	.stab.excl       0 : { *(.stab.excl) }
	.stab.exclstr    0 : { *(.stab.exclstr) }
	.stab.index      0 : { *(.stab.index) }
	.stab.indexstr   0 : { *(.stab.indexstr) }
	.comment         0 : { *(.comment) }

	/*
	 * 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) }
}