source: rtems/c/src/lib/libbsp/sh/gensh2/startup/linkcmds.ram @ 0682df58

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

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

  • Makefile.am, startup/linkcmds, startup/linkcmds.ram, startup/linkcmds.rom: Use top level shared bsp_get_work_area() implementation.
  • Property mode set to 100644
File size: 6.8 KB
Line 
1/*
2 * This is an adapted linker script from egcs-1.0.1
3 *
4 * Memory layout for an SH7045F with main memory in area 2
5 * This memory layout it very similar to that used for Hitachi's
6 * EVB with CMON in FLASH
7 *
8 * NOTE: The ram start address may vary, all other start addresses are fixed
9 *       Not suiteable for gdb's simulator
10 *
11 *  Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
12 *           Bernd Becker (becker@faw.uni-ulm.de)
13 *
14 *  COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
15 *
16 *  This program is distributed in the hope that it will be useful,
17 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 *
21 *  COPYRIGHT (c) 1998.
22 *  On-Line Applications Research Corporation (OAR).
23 *
24 *  The license and distribution terms for this file may be
25 *  found in the file LICENSE in this distribution or at
26 *  http://www.rtems.com/license/LICENSE.
27 *
28 *      Modified to reflect SH7045F processor and EVB:
29 *      John M. Mills (jmills@tga.com)
30 *      TGA Technologies, Inc.
31 *      100 Pinnacle Way, Suite 140
32 *      Norcross, GA 30071 U.S.A.
33 *
34 *      This modified file may be copied and distributed in accordance
35 *      the above-referenced license. It is provided for critique and
36 *      developmental purposes without any warranty nor representation
37 *      by the authors or by TGA Technologies.
38 *
39 *  $Id$
40 */
41
42OUTPUT_FORMAT("coff-sh")
43OUTPUT_ARCH(sh)
44ENTRY(_start)
45
46/* These assignments load code into SH7045F EVB SRAM for monitor debugging */
47_RamBase = DEFINED(_RamBase) ? _RamBase : 0x00440000;
48_RamSize = DEFINED(_RamSize) ? _RamSize : 512K;
49_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
50
51MEMORY
52{
53  rom           : o = 0x00400000, l = 0x00040000
54  ram           : o = 0x00440000, l = 0x00080000
55  onchip_peri   : o = 0xFFFF8000, l = 0x00000800
56  onchip_ram    : o = 0xFFFFF000, l = 0x00001000
57}
58
59/* Sections are defined for RAM loading and monitor debugging */
60SECTIONS
61{
62  /* boot vector table */
63  .monvects 0x00400000 (NOLOAD): {
64    _monvects = . ;
65  } > rom
66
67  /* monitor play area */
68  .monram 0x00440000 (NOLOAD) :
69  {
70  _ramstart = .;
71  } > ram
72
73  /* monitor vector table */
74  .vects   0x00442000 (NOLOAD) : {
75    _vectab = . ;
76    *(.vects);
77  }
78
79  /* Read-only sections, merged into text segment: */
80
81  . = 0x00444000 ;
82  .interp        : { *(.interp)         }
83  .hash          : { *(.hash)           }
84  .dynsym        : { *(.dynsym)         }
85  .dynstr        : { *(.dynstr)         }
86  .gnu.version   : { *(.gnu.version)    }
87  .gnu.version_d : { *(.gnu.version_d)  }
88  .gnu.version_r : { *(.gnu.version_r)  }
89  .rela.dyn       :
90    {
91      *(.rela.init)
92      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
93      *(.rela.fini)
94      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
95      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
96      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
97      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
98      *(.rela.ctors)
99      *(.rela.dtors)
100      *(.rela.got)
101      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
102      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
103      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
104      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
105      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
106    } >ram
107  .rel.text      :
108    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
109  .rel.data      :
110    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
111  .rel.rodata    :
112    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
113  .rel.got       : { *(.rel.got)                }
114  .rel.ctors     : { *(.rel.ctors)      }
115  .rel.dtors     : { *(.rel.dtors)      }
116  .rel.init      : { *(.rel.init)       }
117  .rel.fini      : { *(.rel.fini)       }
118  .rel.bss       : { *(.rel.bss)                }
119  .rel.plt       : { *(.rel.plt)                }
120  .init          : { *(.init)   } =0
121  .plt           : { *(.plt)    }
122  .text   .      :
123  {
124    *(.text*)
125    *(.stub)
126
127    /*
128     * Special FreeBSD sysctl sections.
129     */
130    . = ALIGN (16);
131    ___start_set_sysctl_set = .;
132    *(set_sysc*);   /* set_sysctl_* but name is truncated by SH-coff */
133    ___stop_set_sysctl_set = ABSOLUTE(.);
134    *(set_doma*);   /* set_domain_* but name is truncated by SH-coff */
135    *(set_pseudo_*);
136
137    /* .gnu.warning sections are handled specially by elf32.em.  */
138    *(.gnu.warning)
139    *(.gnu.linkonce.t*)
140  } > ram
141  _etext = .;
142  PROVIDE (etext = .);
143  .fini    .  : { *(.fini)    } =0
144  .rodata  .  : { *(.rodata) *(.gnu.linkonce.r*) }
145  .rodata1 .  : { *(.rodata1) }
146  /* Adjust the address for the data segment.  We want to adjust up to
147     the same address within the page on the next page up.  */
148  . = ALIGN(128) + (. & (128 - 1));
149  .data  .  :
150  {
151    *(.data)
152    *(.gnu.linkonce.d*)
153    CONSTRUCTORS
154  } > ram
155  .data1  . : { *(.data1) }
156  .ctors  .       :
157  {
158    ___ctors = .;
159    *(.ctors)
160    ___ctors_end = .;
161  }
162  .dtors  .       :
163  {
164    ___dtors = .;
165    *(.dtors)
166    ___dtors_end = .;
167  }
168  .got     .      : { *(.got.plt) *(.got) }
169  .dynamic .      : { *(.dynamic) }
170  /* We want the small data sections together, so single-instruction offsets
171     can access them all, and initialized data all before uninitialized, so
172     we can shorten the on-disk segment size.  */
173  .sdata   .  : { *(.sdata) }
174  _edata  =  .;
175  PROVIDE (edata = .);
176  __bss_start = .;
177  .sbss    .  : { *(.sbss*) *(.scommon) }
178  .bss     .  :
179  {
180   *(.dynbss)
181   *(.bss .bss* .gnu.linkonce.b*)
182   *(COMMON)
183  } > ram
184  _end = . ;
185  PROVIDE (end = .);
186
187  _WorkAreaBase = . ;
188  . = 0x00480000 ;
189
190  _CPU_Interrupt_stack_low  = 0xFFFFF000;
191  _CPU_Interrupt_stack_high = 0xFFFFFFFF;
192
193  /* Stabs debugging sections.  */
194  .stab 0 : { *(.stab) }
195  .stabstr 0 : { *(.stabstr) }
196  .stab.excl 0 : { *(.stab.excl) }
197  .stab.exclstr 0 : { *(.stab.exclstr) }
198  .stab.index 0 : { *(.stab.index) }
199  .stab.indexstr 0 : { *(.stab.indexstr) }
200  .comment 0 : { *(.comment) }
201  /* DWARF debug sections.
202     Symbols in the DWARF debugging sections are relative to the beginning
203     of the section so we begin them at 0.  */
204  /* DWARF 1 */
205  .debug          0 : { *(.debug) }
206  .line           0 : { *(.line) }
207  /* GNU DWARF 1 extensions */
208  .debug_srcinfo  0 : { *(.debug_srcinfo) }
209  .debug_sfnames  0 : { *(.debug_sfnames) }
210  /* DWARF 1.1 and DWARF 2 */
211  .debug_aranges  0 : { *(.debug_aranges) }
212  .debug_pubnames 0 : { *(.debug_pubnames) }
213  /* DWARF 2 */
214  .debug_info     0 : { *(.debug_info) }
215  .debug_abbrev   0 : { *(.debug_abbrev) }
216  .debug_line     0 : { *(.debug_line) }
217  .debug_frame    0 : { *(.debug_frame) }
218  .debug_str      0 : { *(.debug_str) }
219  .debug_loc      0 : { *(.debug_loc) }
220  .debug_macinfo  0 : { *(.debug_macinfo) }
221  /* SGI/MIPS DWARF 2 extensions */
222  .debug_weaknames 0 : { *(.debug_weaknames) }
223  .debug_funcnames 0 : { *(.debug_funcnames) }
224  .debug_typenames 0 : { *(.debug_typenames) }
225  .debug_varnames  0 : { *(.debug_varnames) }
226
227  .stack 0xFFFFFEC0 : { _stack = .; *(.stack) } > onchip_ram
228  /* These must appear regardless of  .  */
229}
Note: See TracBrowser for help on using the repository browser.