source: rtems/c/src/lib/libbsp/sh/gensh2/startup/linkcmds.ram @ 5e1b695

4.104.114.84.95
Last change on this file since 5e1b695 was 5e1b695, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:52:44

2003-09-04 Joel Sherrill <joel@…>

  • console/config.c, include/bsp.h, include/coverhd.h, start/start.S, start/start.ram, start/start.rom, startup/bspclean.c, startup/bspstart.c, startup/hw_init.c, startup/linkcmds, startup/linkcmds.ram, startup/linkcmds.rom: URL for license changed.
  • Property mode set to 100644
File size: 6.5 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
48MEMORY
49{
50  rom           : o = 0x00400000, l = 0x00040000
51  ram           : o = 0x00440000, l = 0x00080000
52  onchip_peri   : o = 0xFFFF8000, l = 0x00000800
53  onchip_ram    : o = 0xFFFFF000, l = 0x00001000
54}
55
56/* Sections are defined for RAM loading and monitor debugging */
57SECTIONS
58{
59  /* boot vector table */
60  .monvects 0x00400000 (NOLOAD): {
61    _monvects = . ;
62  } > rom
63
64  /* monitor play area */
65  .monram 0x00440000 (NOLOAD) :
66  {
67  _ramstart = .;
68  } > ram
69
70  /* monitor vector table */
71  .vects   0x00442000 (NOLOAD) : {
72    _vectab = . ;
73    *(.vects);
74  }
75
76  /* Read-only sections, merged into text segment: */
77
78  . = 0x00444000 ;
79  .interp        : { *(.interp)         }
80  .hash          : { *(.hash)           }
81  .dynsym        : { *(.dynsym)         }
82  .dynstr        : { *(.dynstr)         }
83  .gnu.version   : { *(.gnu.version)    }
84  .gnu.version_d : { *(.gnu.version_d)  }
85  .gnu.version_r : { *(.gnu.version_r)  }
86  .rel.text      :
87    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
88  .rela.text     :
89    { *(.rela.text) *(.rela.gnu.linkonce.t*) }
90  .rel.data      :
91    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
92  .rela.data     :
93    { *(.rela.data) *(.rela.gnu.linkonce.d*) }
94  .rel.rodata    :
95    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
96  .rela.rodata   :
97    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
98  .rel.got       : { *(.rel.got)                }
99  .rela.got      : { *(.rela.got)               }
100  .rel.ctors     : { *(.rel.ctors)      }
101  .rela.ctors    : { *(.rela.ctors)     }
102  .rel.dtors     : { *(.rel.dtors)      }
103  .rela.dtors    : { *(.rela.dtors)     }
104  .rel.init      : { *(.rel.init)       }
105  .rela.init     : { *(.rela.init)      }
106  .rel.fini      : { *(.rel.fini)       }
107  .rela.fini     : { *(.rela.fini)      }
108  .rel.bss       : { *(.rel.bss)                }
109  .rela.bss      : { *(.rela.bss)               }
110  .rel.plt       : { *(.rel.plt)                }
111  .rela.plt      : { *(.rela.plt)               }
112  .init          : { *(.init)   } =0
113  .plt           : { *(.plt)    }
114  .text   .      :
115  {
116    *(.text)
117    *(.stub)
118
119    /*
120     * Special FreeBSD sysctl sections.
121     */
122    . = ALIGN (16);
123    ___start_set_sysctl_set = .;
124    *(set_sysc*);   /* set_sysctl_* but name is truncated by SH-coff */
125    ___stop_set_sysctl_set = ABSOLUTE(.);
126    *(set_doma*);   /* set_domain_* but name is truncated by SH-coff */
127    *(set_pseudo_*);
128
129    /* .gnu.warning sections are handled specially by elf32.em.  */
130    *(.gnu.warning)
131    *(.gnu.linkonce.t*)
132  } > ram
133  _etext = .;
134  PROVIDE (etext = .);
135  .fini    .  : { *(.fini)    } =0
136  .rodata  .  : { *(.rodata) *(.gnu.linkonce.r*) }
137  .rodata1 .  : { *(.rodata1) }
138  /* Adjust the address for the data segment.  We want to adjust up to
139     the same address within the page on the next page up.  */
140  . = ALIGN(128) + (. & (128 - 1));
141  .data  .  :
142  {
143    *(.data)
144    *(.gnu.linkonce.d*)
145    CONSTRUCTORS
146  } > ram
147  .data1  . : { *(.data1) }
148  .ctors  .       :
149  {
150    ___ctors = .;
151    *(.ctors)
152    ___ctors_end = .;
153  }
154  .dtors  .       :
155  {
156    ___dtors = .;
157    *(.dtors)
158    ___dtors_end = .;
159  }
160  .got     .      : { *(.got.plt) *(.got) }
161  .dynamic .      : { *(.dynamic) }
162  /* We want the small data sections together, so single-instruction offsets
163     can access them all, and initialized data all before uninitialized, so
164     we can shorten the on-disk segment size.  */
165  .sdata   .  : { *(.sdata) }
166  _edata  =  .;
167  PROVIDE (edata = .);
168  __bss_start = .;
169  .sbss    .  : { *(.sbss) *(.scommon) }
170  .bss     .  :
171  {
172   *(.dynbss)
173   *(.bss)
174   *(COMMON)
175  } > ram
176  _end = . ;
177  PROVIDE (end = .);
178
179  _HeapStart = . ;
180  . = . + 1024 * 20 ;
181  PROVIDE( _HeapEnd = . );
182
183  _WorkSpaceStart = . ;
184  . = 0x00480000 ;
185  PROVIDE(_WorkSpaceEnd = .);
186
187  _CPU_Interrupt_stack_low  = 0xFFFFF000 ;
188  _CPU_Interrupt_stack_high = _CPU_Interrupt_stack_low + 4096 ;
189
190  /* Stabs debugging sections.  */
191  .stab 0 : { *(.stab) }
192  .stabstr 0 : { *(.stabstr) }
193  .stab.excl 0 : { *(.stab.excl) }
194  .stab.exclstr 0 : { *(.stab.exclstr) }
195  .stab.index 0 : { *(.stab.index) }
196  .stab.indexstr 0 : { *(.stab.indexstr) }
197  .comment 0 : { *(.comment) }
198  /* DWARF debug sections.
199     Symbols in the DWARF debugging sections are relative to the beginning
200     of the section so we begin them at 0.  */
201  /* DWARF 1 */
202  .debug          0 : { *(.debug) }
203  .line           0 : { *(.line) }
204  /* GNU DWARF 1 extensions */
205  .debug_srcinfo  0 : { *(.debug_srcinfo) }
206  .debug_sfnames  0 : { *(.debug_sfnames) }
207  /* DWARF 1.1 and DWARF 2 */
208  .debug_aranges  0 : { *(.debug_aranges) }
209  .debug_pubnames 0 : { *(.debug_pubnames) }
210  /* DWARF 2 */
211  .debug_info     0 : { *(.debug_info) }
212  .debug_abbrev   0 : { *(.debug_abbrev) }
213  .debug_line     0 : { *(.debug_line) }
214  .debug_frame    0 : { *(.debug_frame) }
215  .debug_str      0 : { *(.debug_str) }
216  .debug_loc      0 : { *(.debug_loc) }
217  .debug_macinfo  0 : { *(.debug_macinfo) }
218  /* SGI/MIPS DWARF 2 extensions */
219  .debug_weaknames 0 : { *(.debug_weaknames) }
220  .debug_funcnames 0 : { *(.debug_funcnames) }
221  .debug_typenames 0 : { *(.debug_typenames) }
222  .debug_varnames  0 : { *(.debug_varnames) }
223
224  .stack 0xFFFFFEC0 : { _stack = .; *(.stack) } > onchip_ram
225  /* These must appear regardless of  .  */
226}
Note: See TracBrowser for help on using the repository browser.