source: rtems/c/src/lib/libbsp/sh/shsim/startup/linkcmds @ 8f402bf

4.104.115
Last change on this file since 8f402bf was 8f402bf, checked in by Joel Sherrill <joel.sherrill@…>, on 09/16/08 at 20:13:24

2008-09-16 Joel Sherrill <joel.sherrill@…>

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