source: rtems/bsps/sh/shsim/start/linkcmds @ 9964895

5
Last change on this file since 9964895 was 9964895, checked in by Sebastian Huber <sebastian.huber@…>, on 04/20/18 at 08:35:35

bsps: Move startup files to bsps

Adjust build support files to new directory layout.

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 7.3 KB
Line 
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
20OUTPUT_ARCH(sh)
21ENTRY(_start)
22STARTUP(start.o)
23
24_RamBase = DEFINED(_RamBase) ? _RamBase : 0x00000000;
25_RamSize = DEFINED(_RamSize) ? _RamSize : 16M;
26_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
27
28MEMORY
29{
30/* Real memory layout submitted
31  rom           : o = 0x00000000, l = 128k
32  ram           : o = 0x00040000, l = 256k
33*/
34
35/* Memory layout which links all tests */
36  rom           : o = 0x01000000, l = 512k
37  ram           : o = 0x00040000, l = 512k
38
39  onchip_peri   : o = 0x05000000, l = 512
40}
41
42SECTIONS
43{
44  /* boot vector table */
45  .monvects (NOLOAD) :
46  {
47    _monvects = . ;
48  } > rom
49
50  /* monitor play area */
51  .monram 0x00040000 (NOLOAD) :
52  {
53  _ramstart = .;
54  } > ram
55
56  /* monitor vector table */
57  .vects   0x00042000 (NOLOAD) : {
58    _vectab = . ;
59    *(.vects);
60  }
61
62  /* Read-only sections, merged into text segment: */
63
64  . = 0x00044000 ;
65  .interp        : { *(.interp)         }
66  .hash          : { *(.hash)           }
67  .dynsym        : { *(.dynsym)         }
68  .dynstr        : { *(.dynstr)         }
69  .gnu.version   : { *(.gnu.version)    }
70  .gnu.version_d : { *(.gnu.version_d)  }
71  .gnu.version_r : { *(.gnu.version_r)  }
72  .rela.dyn       :
73    {
74      *(.rela.init)
75      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
76      *(.rela.fini)
77      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
78      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
79      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
80      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
81      *(.rela.ctors)
82      *(.rela.dtors)
83      *(.rela.got)
84      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
85      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
86      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
87      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
88      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
89    } >ram
90  .rel.text      :
91    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
92  .rel.data      :
93    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
94  .rel.rodata    :
95    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
96  .rel.got       : { *(.rel.got)                }
97  .rel.ctors     : { *(.rel.ctors)      }
98  .rel.dtors     : { *(.rel.dtors)      }
99  .rel.init      : { *(.rel.init)       }
100  .rel.fini      : { *(.rel.fini)       }
101  .rel.bss       : { *(.rel.bss)                }
102  .rel.plt       : { *(.rel.plt)                }
103  .plt           : { *(.plt)    }
104  .text   .      :
105  {
106    _start = .;
107    *(.text*)
108    *(.stub)
109
110    /*
111     * Special FreeBSD sysctl sections.
112     */
113    . = ALIGN (16);
114    ___start_set_sysctl_set = .;
115    *(set_sysc*);   /* set_sysctl_* but name is truncated by SH-coff */
116    ___stop_set_sysctl_set = ABSOLUTE(.);
117    *(set_doma*);   /* set_domain_* but name is truncated by SH-coff */
118    *(set_pseu*);   /* set_pseudo_* but name is truncated by SH-coff */
119
120    /* .gnu.warning sections are handled specially by elf32.em.  */
121    *(.gnu.warning)
122    *(.gnu.linkonce.t*)
123  } > ram
124  .init           :
125  {
126    KEEP (*(.init))
127  } >ram
128  .fini           :
129  {
130    KEEP (*(.fini))
131  } >ram
132  _etext = .;
133  PROVIDE (etext = .);
134  .rodata  .  : { *(.rodata*) .rodata.* *(.gnu.linkonce.r*) } > ram
135  .rodata1 .  : { *(.rodata1) } > ram
136  .tdata : {
137    __TLS_Data_begin = .;
138    *(.tdata .tdata.* .gnu.linkonce.td.*)
139    __TLS_Data_end = .;
140  } > ram
141  .tbss : {
142    __TLS_BSS_begin = .;
143    *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
144    __TLS_BSS_end = .;
145  } > ram
146  .init    .  : { KEEP(*(.init))    } > ram =0
147  .fini    .  : { KEEP(*(.fini))    } > ram =0
148  .ctors   .  : { KEEP(*(.ctors))    } > ram =0
149  .dtors   .  : { KEEP(*(.dtors))    } > ram =0
150  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
151  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
152  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
153  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
154  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
155  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
156  /* Adjust the address for the data segment.  We want to adjust up to
157     the same address within the page on the next page up.  */
158  . = ALIGN(128) + (. & (128 - 1));
159  .data  .  :
160  {
161    *(.data*)
162    *(.gcc_exc*)
163    ___EH_FRAME_BEGIN__ = .;
164    *(.eh_fram*)
165    ___EH_FRAME_END__ = .;
166    LONG(0);
167    *(.gcc_except_table*)
168    *(.gnu.linkonce.d*)
169    CONSTRUCTORS
170  } > ram
171  .data1  . : { *(.data1) }
172  .rtemsroset : {
173    /* for pre rtems-libbsd FreeBSD code */
174    __start_set_sysctl_set = .;
175    *(set_sysctl_*);
176    __stop_set_sysctl_set = .;
177    *(set_domain_*);
178    *(set_pseudo_*);
179
180    KEEP (*(SORT(.rtemsroset.*)))
181  } >ram
182  .rtemsrwset : {
183    KEEP (*(SORT(.rtemsrwset.*)))
184  } >ram
185
186  .got     .      : { *(.got.plt) *(.got) }
187  .dynamic .      : { *(.dynamic) }
188  /* We want the small data sections together, so single-instruction offsets
189     can access them all, and initialized data all before uninitialized, so
190     we can shorten the on-disk segment size.  */
191  .sdata   .  : { *(.sdata) }
192  _edata  =  .;
193  PROVIDE (edata = .);
194  __bss_start = .;
195  .sbss    .  : { *(.sbss*) *(.scommon) }
196  .bss     .  :
197  {
198   *(.dynbss)
199   *(.bss .bss* .gnu.linkonce.b*)
200   *(COMMON)
201  } > ram
202  _end = . ;
203  PROVIDE (end = .);
204
205  .stack : {
206    . += 0x1000;
207    *(.stack)
208    _stack = .;
209  } > ram
210  _stack = .;
211
212  _WorkAreaBase = . ;
213
214  _CPU_Interrupt_stack_low  = 0x00080000 ;
215  _CPU_Interrupt_stack_high = _CPU_Interrupt_stack_low + 4096 ;
216
217  /* Stabs debugging sections.  */
218  .stab 0 : { *(.stab) }
219  .stabstr 0 : { *(.stabstr) }
220  .stab.excl 0 : { *(.stab.excl) }
221  .stab.exclstr 0 : { *(.stab.exclstr) }
222  .stab.index 0 : { *(.stab.index) }
223  .stab.indexstr 0 : { *(.stab.indexstr) }
224  .comment 0 : { *(.comment) }
225  /* DWARF debug sections.
226     Symbols in the DWARF debugging sections are relative to the beginning
227     of the section so we begin them at 0.  */
228  /* DWARF 1 */
229  .debug          0 : { *(.debug) }
230  .line           0 : { *(.line) }
231  /* GNU DWARF 1 extensions */
232  .debug_srcinfo  0 : { *(.debug_srcinfo) }
233  .debug_sfnames  0 : { *(.debug_sfnames) }
234  /* DWARF 1.1 and DWARF 2 */
235  .debug_aranges  0 : { *(.debug_aranges) }
236  .debug_pubnames 0 : { *(.debug_pubnames) }
237  /* DWARF 2 */
238  .debug_info     0 : { *(.debug_info) }
239  .debug_abbrev   0 : { *(.debug_abbrev) }
240  .debug_line     0 : { *(.debug_line) }
241  .debug_frame    0 : { *(.debug_frame) }
242  .debug_str      0 : { *(.debug_str) }
243  .debug_loc      0 : { *(.debug_loc) }
244  .debug_macinfo  0 : { *(.debug_macinfo) }
245  /* SGI/MIPS DWARF 2 extensions */
246  .debug_weaknames 0 : { *(.debug_weaknames) }
247  .debug_funcnames 0 : { *(.debug_funcnames) }
248  .debug_typenames 0 : { *(.debug_typenames) }
249  .debug_varnames  0 : { *(.debug_varnames) }
250
251/*
252  .stack 0x00081ff0 : { _stack = .; *(.stack) } > onchip_ram
253*/
254  /* These must appear regardless of  .  */
255}
Note: See TracBrowser for help on using the repository browser.