source: rtems/c/src/lib/libbsp/sh/gensh1/startup/linkcmds @ ed3ec25

4.104.114.84.95
Last change on this file since ed3ec25 was ed3ec25, checked in by Joel Sherrill <joel.sherrill@…>, on 01/29/01 at 15:28:48

2001-01-26 Ralf Corsepius <corsepiu@…>

  • startup/linkcmds: Remove OUTPUT_FORMAT.
  • Property mode set to 100644
File size: 5.6 KB
Line 
1/*
2 * This is an adapted linker script from egcs-1.0.1
3 *
4 * Memory layout for an SH 7032 with main memory in area 2
5 * This memory layout it very similar to that used for Hitachi's
6 * EVB with CMON in rom
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 *  Copyright assigned to U.S. Government, 1994.
24 *
25 *  The license and distribution terms for this file may be
26 *  found in the file LICENSE in this distribution or at
27 *  http://www.OARcorp.com/rtems/license.html.
28 *
29 *  $Id$
30 */
31
32OUTPUT_ARCH(sh)
33ENTRY(_start)
34
35MEMORY
36{
37  rom           : o = 0x00000000, l = 128k
38  onchip_peri   : o = 0x05000000, l = 512
39  ram           : o = 0x0A040000, l = 256k
40
41  onchip_ram    : o = 0x0f000000, l = 8k
42}
43
44SECTIONS
45{
46  /* boot vector table */
47  .monvects 0x00000000 (NOLOAD): {
48    _monvects = . ;
49  } > rom
50
51  /* monitor play area */
52  .monram 0x0A040000 (NOLOAD) :
53  {
54  _ramstart = .;
55  } > ram
56
57  /* monitor vector table */
58  .vects   0x0A042000 (NOLOAD) : {
59    _vectab = . ;
60    *(.vects);
61  }
62
63  /* Read-only sections, merged into text segment: */
64
65  . = 0x0a044000 ;
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  .rel.text      :
74    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
75  .rela.text     :
76    { *(.rela.text) *(.rela.gnu.linkonce.t*) }
77  .rel.data      :
78    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
79  .rela.data     :
80    { *(.rela.data) *(.rela.gnu.linkonce.d*) }
81  .rel.rodata    :
82    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
83  .rela.rodata   :
84    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
85  .rel.got       : { *(.rel.got)                }
86  .rela.got      : { *(.rela.got)               }
87  .rel.ctors     : { *(.rel.ctors)      }
88  .rela.ctors    : { *(.rela.ctors)     }
89  .rel.dtors     : { *(.rel.dtors)      }
90  .rela.dtors    : { *(.rela.dtors)     }
91  .rel.init      : { *(.rel.init)       }
92  .rela.init     : { *(.rela.init)      }
93  .rel.fini      : { *(.rel.fini)       }
94  .rela.fini     : { *(.rela.fini)      }
95  .rel.bss       : { *(.rel.bss)                }
96  .rela.bss      : { *(.rela.bss)               }
97  .rel.plt       : { *(.rel.plt)                }
98  .rela.plt      : { *(.rela.plt)               }
99  .init          : { *(.init)   } =0
100  .plt           : { *(.plt)    }
101  .text   .      :
102  {
103    *(.text)
104    *(.stub)
105    /* .gnu.warning sections are handled specially by elf32.em.  */
106    *(.gnu.warning)
107    *(.gnu.linkonce.t*)
108  } > ram
109  _etext = .;
110  PROVIDE (etext = .);
111  .fini    .  : { *(.fini)    } =0
112  .rodata  .  : { *(.rodata) *(.gnu.linkonce.r*) }
113  .rodata1 .  : { *(.rodata1) }
114  /* Adjust the address for the data segment.  We want to adjust up to
115     the same address within the page on the next page up.  */
116  . = ALIGN(128) + (. & (128 - 1));
117  .data  .  :
118  {
119    *(.data)
120    *(.gnu.linkonce.d*)
121    CONSTRUCTORS
122  } > ram
123  .data1  . : { *(.data1) }
124  .ctors  .       :
125  {
126    ___ctors = .;
127    *(.ctors)
128    ___ctors_end = .;
129  }
130  .dtors  .       :
131  {
132    ___dtors = .;
133    *(.dtors)
134    ___dtors_end = .;
135  }
136  .got     .      : { *(.got.plt) *(.got) }
137  .dynamic .      : { *(.dynamic) }
138  /* We want the small data sections together, so single-instruction offsets
139     can access them all, and initialized data all before uninitialized, so
140     we can shorten the on-disk segment size.  */
141  .sdata   .  : { *(.sdata) }
142  _edata  =  .;
143  PROVIDE (edata = .);
144  __bss_start = .;
145  .sbss    .  : { *(.sbss) *(.scommon) }
146  .bss     .  :
147  {
148   *(.dynbss)
149   *(.bss)
150   *(COMMON)
151  } > ram
152  _end = . ;
153  PROVIDE (end = .);
154
155  _HeapStart = . ;
156  . = . + 1024 * 20 ;
157  PROVIDE( _HeapEnd = . );
158
159  _WorkSpaceStart = . ;
160  . = 0x0a080000 ;
161  PROVIDE(_WorkSpaceEnd = .);
162
163  _CPU_Interrupt_stack_low  = 0x0f000000 ;
164  _CPU_Interrupt_stack_high = _CPU_Interrupt_stack_low + 4096 ;
165
166  /* Stabs debugging sections.  */
167  .stab 0 : { *(.stab) }
168  .stabstr 0 : { *(.stabstr) }
169  .stab.excl 0 : { *(.stab.excl) }
170  .stab.exclstr 0 : { *(.stab.exclstr) }
171  .stab.index 0 : { *(.stab.index) }
172  .stab.indexstr 0 : { *(.stab.indexstr) }
173  .comment 0 : { *(.comment) }
174  /* DWARF debug sections.
175     Symbols in the DWARF debugging sections are relative to the beginning
176     of the section so we begin them at 0.  */
177  /* DWARF 1 */
178  .debug          0 : { *(.debug) }
179  .line           0 : { *(.line) }
180  /* GNU DWARF 1 extensions */
181  .debug_srcinfo  0 : { *(.debug_srcinfo) }
182  .debug_sfnames  0 : { *(.debug_sfnames) }
183  /* DWARF 1.1 and DWARF 2 */
184  .debug_aranges  0 : { *(.debug_aranges) }
185  .debug_pubnames 0 : { *(.debug_pubnames) }
186  /* DWARF 2 */
187  .debug_info     0 : { *(.debug_info) }
188  .debug_abbrev   0 : { *(.debug_abbrev) }
189  .debug_line     0 : { *(.debug_line) }
190  .debug_frame    0 : { *(.debug_frame) }
191  .debug_str      0 : { *(.debug_str) }
192  .debug_loc      0 : { *(.debug_loc) }
193  .debug_macinfo  0 : { *(.debug_macinfo) }
194  /* SGI/MIPS DWARF 2 extensions */
195  .debug_weaknames 0 : { *(.debug_weaknames) }
196  .debug_funcnames 0 : { *(.debug_funcnames) }
197  .debug_typenames 0 : { *(.debug_typenames) }
198  .debug_varnames  0 : { *(.debug_varnames) }
199
200  .stack 0x0f001ff0 : { _stack = .; *(.stack) } > onchip_ram
201  /* These must appear regardless of  .  */
202}
Note: See TracBrowser for help on using the repository browser.