source: trunk/libs/newlib/src/libgloss/mep/fmax.ld @ 536

Last change on this file since 536 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 8.2 KB
Line 
1/******************************************************************************
2begin-header
3
4  DO NOT EDIT. THIS FILE IS MACHINE-GENERATED
5  FROM THE TEMPLATE FILE gmap_default.ld.
6  ALL EDITS WILL BE ERASED WITH NEXT MeP-Integrator RUN.
7
8  Custom linker script for the MeP Module fmax.
9end-header
10*******************************************************************************/
11
12OUTPUT_FORMAT("elf32-mep", "elf32-mep",
13              "elf32-mep")
14OUTPUT_ARCH(mep)
15ENTRY(_reset)
16
17MEMORY
18{
19/* begin-memory */
20  VEC   (r) : ORIGIN = 0x00000000, LENGTH = 0x000000b8
21  HWINIT        (r) : ORIGIN = 0x000000b8, LENGTH = 0x00000148
22  ROM   (r) : ORIGIN = 0x00000200, LENGTH = 0x001ffe00
23  RAM1  (w) : ORIGIN = 0x008000b8, LENGTH = 0x007fff48
24/*VEC_WARM      (w) : ORIGIN = 0x00800000, LENGTH = 0x000000b8 */
25/*RAM2  (w) : ORIGIN = 0x80800000, LENGTH = 0x00800000 */
26/* end-memory */
27}
28
29SECTIONS
30{
31  /* Sections to be placed in the vec area.  */
32  .vec : { *(.vec) } >VEC /* VEC-section */
33
34  /* Sections to be placed in the HWINIT area.  */
35  .hwinit : { *(.hwinit) } >HWINIT /* HWINIT-section */
36
37  /* Sections to be placed in the ROM area.  */
38  .gnu.version   : { *(.gnu.version)    } >ROM /* ROM-section */
39  .gnu.version_d : { *(.gnu.version_d)  } >ROM /* ROM-section */
40  .gnu.version_r : { *(.gnu.version_r)  } >ROM /* ROM-section */
41
42  /* Sections to be placed in the romdata.s area.  */
43  .srodata :
44  {
45    __sdabase = . + 0x8000;
46    *(.srodata) *(.srodata.*) *(.gnu.linkonce.srd.*)
47  } >RAM1 /* DATA-section */
48
49  /* Sections to be placed in the data.s area.  */
50  .sdata     :
51  {
52    *(.sdata)
53    *(.sdata.*)
54    *(.gnu.linkonce.s.*)
55  } >RAM1 /* DATA-section */
56  .sbss      :
57  {
58    PROVIDE (__sbss_start = .);
59    PROVIDE (___sbss_start = .);
60    *(.dynsbss)
61    *(.sbss)
62    *(.sbss.*)
63    *(.gnu.linkonce.sb.*)
64    *(.scommon)
65    PROVIDE (__sbss_end = .);
66    PROVIDE (___sbss_end = .);
67    /* Assert maximum size */
68    __assert_tiny_size = ASSERT ((. < __sdabase) || ((. - __sdabase) <= 0x8000),
69                                 "tiny section overflow");
70  } >RAM1 /* DATA-section */
71
72  /* Sections to be placed in the data.m area.  */
73  .data    :
74  {
75    __data_start = . ;
76    *(.data)
77    *(.data.*)
78    *(.gnu.linkonce.d.*)
79    SORT(CONSTRUCTORS)
80  } >RAM1 /* DATA-section */
81  .data1   : { *(.data1) } >RAM1 /* DATA-section */
82  .eh_frame : { KEEP (*(.eh_frame))} >RAM1 /* DATA-section */
83  .gcc_except_table : { *(.gcc_except_table) *(.gcc_except_table.*) } >RAM1 /* DATA-section */
84  .dynamic       : { *(.dynamic) } >RAM1 /* DATA-section */
85  .ctors   :
86  {
87    /* gcc uses crtbegin.o to find the start of
88       the constructors, so we make sure it is
89       first.  Because this is a wildcard, it
90       doesn't matter if the user does not
91       actually link against crtbegin.o; the
92       linker won't look for a file to match a
93       wildcard.  The wildcard also means that it
94       doesn't matter which directory crtbegin.o
95       is in.  */
96    KEEP (*crtbegin.o(.ctors))
97    /* We don't want to include the .ctor section from
98       from the crtend.o file until after the sorted ctors.
99       The .ctor section from the crtend file contains the
100       end of ctors marker and it must be last */
101    KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
102    KEEP (*(SORT(.ctors.*)))
103    KEEP (*(.ctors))
104  } >RAM1 /* DATA-section */
105  .dtors         :
106  {
107    KEEP (*crtbegin.o(.dtors))
108    KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
109    KEEP (*(SORT(.dtors.*)))
110    KEEP (*(.dtors))
111  } >RAM1 /* DATA-section */
112  .jcr :
113  {
114    . = ALIGN(4);
115    *(.jcr)
116  } >RAM1 /* DATA-section */
117  .got :
118  {
119    *(.got.plt) *(.got)
120    _edata = .;
121    PROVIDE (edata = .);
122  } >RAM1 /* DATA-section */
123  .based :
124  {
125    __tpbase = .;
126    *(.based) *(.based.*) *(.gnu.linkonce.based.*)
127    /* Assert maximum size */
128    __assert_based_size = ASSERT ((. - __tpbase) <= 0x80,
129                                  "based section overflow");
130  } >RAM1 /* DATA-section */
131
132  .bss       :
133  {
134    __bss_start = .;
135    *(.dynbss)
136    *(.bss)
137    *(.bss.*)
138    *(.gnu.linkonce.b.*)
139    *(COMMON)
140    /* Align here to ensure that the .bss section occupies space up to
141      _end.  Align after .bss to ensure correct alignment even if the
142      .bss section disappears because there are no input sections.  */
143    . = ALIGN(32 / 8);
144    _end = .;
145    PROVIDE (end = .);
146  } >RAM1 /* DATA-section */
147
148  /* Sections to be placed in the code.m area.  */
149  .init          :
150  {
151    KEEP (*(.init))
152  } >RAM1 /* CODE-section */
153  .plt      : { *(.plt) } >RAM1 /* DATA-section */
154  .text      :
155  {
156    *(.text)
157    *(.text.*)
158    *(.stub)
159    /* .gnu.warning sections are handled specially by elf32.em.  */
160    *(.gnu.warning)
161    *(.gnu.linkonce.t.*)
162  } >RAM1 /* CODE-section */ =0
163  .vtext ALIGN(8)    :
164  {
165    *(.vtext) *(.vtext.*) *(.gnu.linkonce.v.*)
166  } >RAM1 /* CODE-section */
167  .fini      :
168  {
169    KEEP (*(.fini))
170    PROVIDE (__etext = .);
171    PROVIDE (_etext = .);
172    PROVIDE (etext = .);
173  } >RAM1 /* CODE-section */ =0
174
175  /* Sections to be placed in the romdata.m area.  */
176  .rodata   : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } >RAM1 /* DATA-section */
177  .rodata1   : { *(.rodata1) } >RAM1 /* DATA-section */
178
179  /* Sections to be placed in the code.l area.  */
180  .ftext : {  *(.ftext) *(.ftext.*) *(.gnu.linkonce.ft.*) } >RAM1 /* CODE-section */
181  .vftext ALIGN(8)    :
182  {
183    *(.vftext) *(.vftext.*) *(.gnu.linkonce.vf.*)
184  } >RAM1 /* CODE-section */
185
186  /* Sections to be placed in the romdata.l area.  */
187  .frodata :
188  {
189    *(.frodata) *(.frodata.*) *(.gnu.linkonce.frd.*)
190    __assert_near_size = ASSERT (. <= 0x1000000, "near section overflow");
191  } >RAM1 /* DATA-section */
192
193  /* Sections to be placed in the data.l area.  */
194  .far : { *(.far) *(.far.*) *(.gnu.linkonce.far.*) } >RAM1 /* DATA-section */
195  .farbss :
196  { PROVIDE (__farbss_start = .);
197    *(.farbss) *(.farbss.*)
198    PROVIDE (__farbss_end = .);
199  } >RAM1 /* DATA-section */
200
201  /* END-mep-sections */
202
203  /* begin-stack-table */
204  __stack1 = (__stack - (0 *  (__stack_size / 2)) + 15) / 16 * 16;
205  __stack2 = (__stack - (1 *  (__stack_size / 2)) + 15) / 16 * 16;
206
207  .rostacktab :
208  {
209    /* Emit a table describing the location of the different stacks.  */
210    . = ALIGN(4);
211    __stack_table = .;
212    LONG (__stack2);
213    LONG (__stack1);
214    LONG (__stack2);
215    __stack_end = .;
216  } >RAM1
217  /* end-stack-table */
218
219  /* begin-heap */
220  /* End of DATA is 0x008000b8 + 0x007fff48. That's where the heap will end.  */
221  __heap_end = 0x008000b8 + 0x007fff48 - 1;
222  /* end-heap */
223
224  /* Default stack size is 1M.  That's where the heap will start if there's
225     room.  If there's not enough room, allocate half of the remaining space
226     for stack and half for heap.  Align the heap on a 16 byte boundary.  */
227  __stack_size = (__stack_end + 0x100000 <= __heap_end + 1
228                  ? 0x100000
229                  : ((__heap_end + 1 - __stack_end) / 2));
230  __heap = (__stack_end + __stack_size + 15) / 16 * 16;
231
232  /* Leave 16 bytes between the stack and the heap.  */
233  __stack = __heap - 0x10;
234
235  /* Stabs debugging sections.  */
236  .stab 0 : { *(.stab) }
237  .stabstr 0 : { *(.stabstr) }
238  .stab.excl 0 : { *(.stab.excl) }
239  .stab.exclstr 0 : { *(.stab.exclstr) }
240  .stab.index 0 : { *(.stab.index) }
241  .stab.indexstr 0 : { *(.stab.indexstr) }
242  .comment 0 : { *(.comment) }
243  /* DWARF debug sections.
244     Symbols in the DWARF debugging sections are relative to the beginning
245     of the section so we begin them at 0.  */
246  /* DWARF 1 */
247  .debug          0 : { *(.debug) }
248  .line           0 : { *(.line) }
249  /* GNU DWARF 1 extensions */
250  .debug_srcinfo  0 : { *(.debug_srcinfo) }
251  .debug_sfnames  0 : { *(.debug_sfnames) }
252  /* DWARF 1.1 and DWARF 2 */
253  .debug_aranges  0 : { *(.debug_aranges) }
254  .debug_pubnames 0 : { *(.debug_pubnames) }
255  /* DWARF 2 */
256  .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
257  .debug_abbrev   0 : { *(.debug_abbrev) }
258  .debug_line     0 : { *(.debug_line) }
259  .debug_frame    0 : { *(.debug_frame) }
260  .debug_str      0 : { *(.debug_str) }
261  .debug_loc      0 : { *(.debug_loc) }
262  .debug_macinfo  0 : { *(.debug_macinfo) }
263  .debug_ranges   0 : { *(.debug_ranges) }
264  /* SGI/MIPS DWARF 2 extensions */
265  .debug_weaknames 0 : { *(.debug_weaknames) }
266  .debug_funcnames 0 : { *(.debug_funcnames) }
267  .debug_typenames 0 : { *(.debug_typenames) }
268  .debug_varnames  0 : { *(.debug_varnames) }
269  /* These must appear regardless of  .  */
270}
Note: See TracBrowser for help on using the repository browser.