source: anotherchoice/tags/jsp-1.4.4-full-UTF8/config/lm32/ecp2/lm32elf_flash.ld@ 363

Last change on this file since 363 was 363, checked in by ykominami, 5 years ago

add tags/jsp-1.4.4-full-UTF8

  • Property svn:executable set to *
File size: 4.3 KB
Line 
1/*
2 * Link script for LatticeMico32 programs.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26
27
28OUTPUT_FORMAT("elf32-lm32")
29ENTRY(reset)
30
31/*
32 * This section defines memory attributes (name, origin, length) for the platform
33 */
34MEMORY
35{
36 sram : ORIGIN = 0x04000000, LENGTH = 1048576
37}
38
39SECTIONS
40{
41
42 /* code */
43 .boot : { *(.boot) } > sram
44 .text :
45 {
46 . = ALIGN(4);
47 _ftext = .;
48 *(.text .stub .text.* .gnu.linkonce.t.*)
49 *(.gnu.warning)
50 KEEP (*(.init))
51 KEEP (*(.fini))
52
53 /* Exception handlers */
54 *(.eh_frame_hdr)
55 KEEP (*(.eh_frame))
56 *(.gcc_except_table)
57
58 /* Constructors and destructors */
59 KEEP (*crtbegin*.o(.ctors))
60 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
61 KEEP (*(SORT(.ctors.*)))
62 KEEP (*(.ctors))
63 KEEP (*crtbegin*.o(.dtors))
64 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
65 KEEP (*(SORT(.dtors.*)))
66 KEEP (*(.dtors))
67 KEEP (*(.jcr))
68 _etext = .;
69 } > sram =0
70
71 /* read-only data */
72 .rodata :
73 {
74 . = ALIGN(4);
75 _frodata = .;
76 _frodata_rom = LOADADDR(.rodata);
77 *(.rodata .rodata.* .gnu.linkonce.r.*)
78 *(.rodata1)
79 _erodata = .;
80 } > sram
81
82 /* read/write data */
83 .data :
84 {
85 . = ALIGN(4);
86 _fdata = .;
87 *(.data .data.* .gnu.linkonce.d.*)
88 *(.data1)
89 SORT(CONSTRUCTORS)
90 _gp = ALIGN(16) + 0x7ff0;
91 *(.sdata .sdata.* .gnu.linkonce.s.*)
92 _edata = .;
93 } > sram
94
95 /* bss */
96 .bss :
97 {
98 . = ALIGN(4);
99 _fbss = .;
100 *(.dynsbss)
101 *(.sbss .sbss.* .gnu.linkonce.sb.*)
102 *(.scommon)
103 *(.dynbss)
104 *(.bss .bss.* .gnu.linkonce.b.*)
105 *(COMMON)
106 . = ALIGN(4);
107 _ebss = .;
108 _end = .;
109 PROVIDE (end = .);
110 } > sram
111
112 /* first location in stack is highest address in ram */
113 PROVIDE(_fstack = ORIGIN(sram) + LENGTH(sram) - 4);
114
115 /* stabs debugging sections. */
116 .stab 0 : { *(.stab) }
117 .stabstr 0 : { *(.stabstr) }
118 .stab.excl 0 : { *(.stab.excl) }
119 .stab.exclstr 0 : { *(.stab.exclstr) }
120 .stab.index 0 : { *(.stab.index) }
121 .stab.indexstr 0 : { *(.stab.indexstr) }
122 .comment 0 : { *(.comment) }
123
124 /* DWARF debug sections.
125 Symbols in the DWARF debugging sections are relative to the beginning
126 of the section so we begin them at 0. */
127 /* DWARF 1 */
128 .debug 0 : { *(.debug) }
129 .line 0 : { *(.line) }
130 /* GNU DWARF 1 extensions */
131 .debug_srcinfo 0 : { *(.debug_srcinfo) }
132 .debug_sfnames 0 : { *(.debug_sfnames) }
133 /* DWARF 1.1 and DWARF 2 */
134 .debug_aranges 0 : { *(.debug_aranges) }
135 .debug_pubnames 0 : { *(.debug_pubnames) }
136 /* DWARF 2 */
137 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
138 .debug_abbrev 0 : { *(.debug_abbrev) }
139 .debug_line 0 : { *(.debug_line) }
140 .debug_frame 0 : { *(.debug_frame) }
141 .debug_str 0 : { *(.debug_str) }
142 .debug_loc 0 : { *(.debug_loc) }
143 .debug_macinfo 0 : { *(.debug_macinfo) }
144 /* SGI/MIPS DWARF 2 extensions */
145 .debug_weaknames 0 : { *(.debug_weaknames) }
146 .debug_funcnames 0 : { *(.debug_funcnames) }
147 .debug_typenames 0 : { *(.debug_typenames) }
148 .debug_varnames 0 : { *(.debug_varnames) }
149}
150
Note: See TracBrowser for help on using the repository browser.