1 | /* |
---|
2 | * Memory layout for an SH 7032 with main memory in area 0 |
---|
3 | * |
---|
4 | * NOTES: |
---|
5 | * + All RAM/ROM areas are mapped onto area 0, because gdb's simulator |
---|
6 | * is not able to simulate memory areas but area 0. Area 5 (on-chip |
---|
7 | * peripherials) can not be mapped onto area 0 and will cause SIGILL |
---|
8 | * exceptions. |
---|
9 | * + Assumed to be compatible with other SH-cpu family members (eg. SH7045) |
---|
10 | * |
---|
11 | * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
12 | * |
---|
13 | * COPYRIGHT (c) 2001, Ralf Corsepius, Ulm, Germany |
---|
14 | * |
---|
15 | * This program is distributed in the hope that it will be useful, |
---|
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
18 | * |
---|
19 | * $Id$ |
---|
20 | */ |
---|
21 | |
---|
22 | OUTPUT_ARCH(sh) |
---|
23 | ENTRY(_start) |
---|
24 | |
---|
25 | MEMORY |
---|
26 | { |
---|
27 | rom : o = 0x00000000, l = 128k |
---|
28 | onchip_peri : o = 0x05000000, l = 512 |
---|
29 | ram : o = 0x00040000, l = 256k |
---|
30 | |
---|
31 | onchip_ram : o = 0x00080000, l = 8k |
---|
32 | } |
---|
33 | |
---|
34 | SECTIONS |
---|
35 | { |
---|
36 | /* boot vector table */ |
---|
37 | .monvects 0x00000000 (NOLOAD) : |
---|
38 | { |
---|
39 | _monvects = . ; |
---|
40 | } > rom |
---|
41 | |
---|
42 | /* monitor play area */ |
---|
43 | .monram 0x00040000 (NOLOAD) : |
---|
44 | { |
---|
45 | _ramstart = .; |
---|
46 | } > ram |
---|
47 | |
---|
48 | /* monitor vector table */ |
---|
49 | .vects 0x00042000 (NOLOAD) : { |
---|
50 | _vectab = . ; |
---|
51 | *(.vects); |
---|
52 | } |
---|
53 | |
---|
54 | /* Read-only sections, merged into text segment: */ |
---|
55 | |
---|
56 | . = 0x00044000 ; |
---|
57 | .interp : { *(.interp) } |
---|
58 | .hash : { *(.hash) } |
---|
59 | .dynsym : { *(.dynsym) } |
---|
60 | .dynstr : { *(.dynstr) } |
---|
61 | .gnu.version : { *(.gnu.version) } |
---|
62 | .gnu.version_d : { *(.gnu.version_d) } |
---|
63 | .gnu.version_r : { *(.gnu.version_r) } |
---|
64 | .rel.text : |
---|
65 | { *(.rel.text) *(.rel.gnu.linkonce.t*) } |
---|
66 | .rela.text : |
---|
67 | { *(.rela.text) *(.rela.gnu.linkonce.t*) } |
---|
68 | .rel.data : |
---|
69 | { *(.rel.data) *(.rel.gnu.linkonce.d*) } |
---|
70 | .rela.data : |
---|
71 | { *(.rela.data) *(.rela.gnu.linkonce.d*) } |
---|
72 | .rel.rodata : |
---|
73 | { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } |
---|
74 | .rela.rodata : |
---|
75 | { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } |
---|
76 | .rel.got : { *(.rel.got) } |
---|
77 | .rela.got : { *(.rela.got) } |
---|
78 | .rel.ctors : { *(.rel.ctors) } |
---|
79 | .rela.ctors : { *(.rela.ctors) } |
---|
80 | .rel.dtors : { *(.rel.dtors) } |
---|
81 | .rela.dtors : { *(.rela.dtors) } |
---|
82 | .rel.init : { *(.rel.init) } |
---|
83 | .rela.init : { *(.rela.init) } |
---|
84 | .rel.fini : { *(.rel.fini) } |
---|
85 | .rela.fini : { *(.rela.fini) } |
---|
86 | .rel.bss : { *(.rel.bss) } |
---|
87 | .rela.bss : { *(.rela.bss) } |
---|
88 | .rel.plt : { *(.rel.plt) } |
---|
89 | .rela.plt : { *(.rela.plt) } |
---|
90 | .init : { *(.init) } =0 |
---|
91 | .plt : { *(.plt) } |
---|
92 | .text . : |
---|
93 | { |
---|
94 | *(.text) |
---|
95 | *(.stub) |
---|
96 | |
---|
97 | /* |
---|
98 | * Special FreeBSD sysctl sections. |
---|
99 | */ |
---|
100 | . = ALIGN (16); |
---|
101 | ___start_set_sysctl_set = .; |
---|
102 | *(set_sysc*); /* set_sysctl_* but name is truncated by SH-coff */ |
---|
103 | ___stop_set_sysctl_set = ABSOLUTE(.); |
---|
104 | *(set_doma*); /* set_domain_* but name is truncated by SH-coff */ |
---|
105 | *(set_pseudo_*); |
---|
106 | |
---|
107 | /* .gnu.warning sections are handled specially by elf32.em. */ |
---|
108 | *(.gnu.warning) |
---|
109 | *(.gnu.linkonce.t*) |
---|
110 | } > ram |
---|
111 | _etext = .; |
---|
112 | PROVIDE (etext = .); |
---|
113 | .fini . : { *(.fini) } =0 |
---|
114 | .rodata . : { *(.rodata*) *(.gnu.linkonce.r*) } |
---|
115 | .rodata1 . : { *(.rodata1) } |
---|
116 | /* Adjust the address for the data segment. We want to adjust up to |
---|
117 | the same address within the page on the next page up. */ |
---|
118 | . = ALIGN(128) + (. & (128 - 1)); |
---|
119 | .data . : |
---|
120 | { |
---|
121 | *(.data) |
---|
122 | *(.gcc_exc*) |
---|
123 | ___EH_FRAME_BEGIN__ = .; |
---|
124 | *(.eh_fram*) |
---|
125 | ___EH_FRAME_END__ = .; |
---|
126 | LONG(0); |
---|
127 | *(.gcc_except_table) |
---|
128 | *(.gnu.linkonce.d*) |
---|
129 | CONSTRUCTORS |
---|
130 | } > ram |
---|
131 | .data1 . : { *(.data1) } |
---|
132 | .ctors . : |
---|
133 | { |
---|
134 | ___ctors = .; |
---|
135 | *(.ctors) |
---|
136 | ___ctors_end = .; |
---|
137 | } |
---|
138 | .dtors . : |
---|
139 | { |
---|
140 | ___dtors = .; |
---|
141 | *(.dtors) |
---|
142 | ___dtors_end = .; |
---|
143 | } |
---|
144 | .got . : { *(.got.plt) *(.got) } |
---|
145 | .dynamic . : { *(.dynamic) } |
---|
146 | /* We want the small data sections together, so single-instruction offsets |
---|
147 | can access them all, and initialized data all before uninitialized, so |
---|
148 | we can shorten the on-disk segment size. */ |
---|
149 | .sdata . : { *(.sdata) } |
---|
150 | _edata = .; |
---|
151 | PROVIDE (edata = .); |
---|
152 | __bss_start = .; |
---|
153 | .sbss . : { *(.sbss) *(.scommon) } |
---|
154 | .bss . : |
---|
155 | { |
---|
156 | *(.dynbss) |
---|
157 | *(.bss) |
---|
158 | *(COMMON) |
---|
159 | } > ram |
---|
160 | _end = . ; |
---|
161 | PROVIDE (end = .); |
---|
162 | |
---|
163 | _HeapStart = . ; |
---|
164 | . = . + 1024 * 20 ; |
---|
165 | PROVIDE( _HeapEnd = . ); |
---|
166 | |
---|
167 | _WorkSpaceStart = . ; |
---|
168 | . = 0x00080000 ; |
---|
169 | PROVIDE(_WorkSpaceEnd = .); |
---|
170 | |
---|
171 | _CPU_Interrupt_stack_low = 0x00080000 ; |
---|
172 | _CPU_Interrupt_stack_high = _CPU_Interrupt_stack_low + 4096 ; |
---|
173 | |
---|
174 | /* Stabs debugging sections. */ |
---|
175 | .stab 0 : { *(.stab) } |
---|
176 | .stabstr 0 : { *(.stabstr) } |
---|
177 | .stab.excl 0 : { *(.stab.excl) } |
---|
178 | .stab.exclstr 0 : { *(.stab.exclstr) } |
---|
179 | .stab.index 0 : { *(.stab.index) } |
---|
180 | .stab.indexstr 0 : { *(.stab.indexstr) } |
---|
181 | .comment 0 : { *(.comment) } |
---|
182 | /* DWARF debug sections. |
---|
183 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
184 | of the section so we begin them at 0. */ |
---|
185 | /* DWARF 1 */ |
---|
186 | .debug 0 : { *(.debug) } |
---|
187 | .line 0 : { *(.line) } |
---|
188 | /* GNU DWARF 1 extensions */ |
---|
189 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
190 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
191 | /* DWARF 1.1 and DWARF 2 */ |
---|
192 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
193 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
194 | /* DWARF 2 */ |
---|
195 | .debug_info 0 : { *(.debug_info) } |
---|
196 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
197 | .debug_line 0 : { *(.debug_line) } |
---|
198 | .debug_frame 0 : { *(.debug_frame) } |
---|
199 | .debug_str 0 : { *(.debug_str) } |
---|
200 | .debug_loc 0 : { *(.debug_loc) } |
---|
201 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
202 | /* SGI/MIPS DWARF 2 extensions */ |
---|
203 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
204 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
205 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
206 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
207 | |
---|
208 | .stack 0x00081ff0 : { _stack = .; *(.stack) } > onchip_ram |
---|
209 | /* These must appear regardless of . */ |
---|
210 | } |
---|