source: rtems/c/src/lib/libbsp/sh/gensh2/startup/linkcmds.rom @ b8de9518

4.104.114.84.95
Last change on this file since b8de9518 was b8de9518, checked in by Joel Sherrill <joel.sherrill@…>, on 06/25/06 at 00:36:23

2006-06-24 Joel Sherrill <joel@…>

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