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

4.104.115
Last change on this file since 11a6c97 was 11a6c97, checked in by Joel Sherrill <joel.sherrill@…>, on 09/15/08 at 19:18:29

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

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