source: rtems/c/src/lib/libbsp/sh/shsim/startup/linkcmds @ 4217b96

4.104.114.84.95
Last change on this file since 4217b96 was 4217b96, checked in by Joel Sherrill <joel.sherrill@…>, on 02/08/06 at 12:28:38

2006-02-08 Joel Sherrill <joel@…>

  • startup/linkcmds: Add sections required by newer gcc versions.
  • Property mode set to 100644
File size: 5.8 KB
Line 
1/*
2 * Memory layout for an SH 7032 with main memory in area 0
3 *
4 * NOTES:
5 * + All RAM/ROM areas are mapped onto area 0, because gdb's simulator
6 * is not able to simulate memory areas but area 0. Area 5 (on-chip
7 * peripherials) can not be mapped onto area 0 and will cause SIGILL
8 * exceptions.
9 * + Assumed to be compatible with other SH-cpu family members (eg. SH7045)
10 *
11 *  Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
12 *
13 *  COPYRIGHT (c) 2001, Ralf Corsepius, Ulm, Germany
14 *
15 *  This program is distributed in the hope that it will be useful,
16 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 *
19 *  $Id$
20 */
21
22OUTPUT_ARCH(sh)
23ENTRY(_start)
24
25MEMORY
26{
27  rom           : o = 0x00000000, l = 128k
28  onchip_peri   : o = 0x05000000, l = 512
29  ram           : o = 0x00040000, l = 256k
30
31  onchip_ram    : o = 0x00080000, l = 8k
32}
33
34SECTIONS
35{
36  /* boot vector table */
37  .monvects 0x00000000 (NOLOAD) :
38  {
39    _monvects = . ;
40  } > rom
41
42  /* monitor play area */
43  .monram 0x00040000 (NOLOAD) :
44  {
45  _ramstart = .;
46  } > ram
47
48  /* monitor vector table */
49  .vects   0x00042000 (NOLOAD) : {
50    _vectab = . ;
51    *(.vects);
52  }
53
54  /* Read-only sections, merged into text segment: */
55
56  . = 0x00044000 ;
57  .interp        : { *(.interp)         }
58  .hash          : { *(.hash)           }
59  .dynsym        : { *(.dynsym)         }
60  .dynstr        : { *(.dynstr)         }
61  .gnu.version   : { *(.gnu.version)    }
62  .gnu.version_d : { *(.gnu.version_d)  }
63  .gnu.version_r : { *(.gnu.version_r)  }
64  .rel.text      :
65    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
66  .rela.text     :
67    { *(.rela.text) *(.rela.gnu.linkonce.t*) }
68  .rel.data      :
69    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
70  .rela.data     :
71    { *(.rela.data) *(.rela.gnu.linkonce.d*) }
72  .rel.rodata    :
73    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
74  .rela.rodata   :
75    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
76  .rel.got       : { *(.rel.got)                }
77  .rela.got      : { *(.rela.got)               }
78  .rel.ctors     : { *(.rel.ctors)      }
79  .rela.ctors    : { *(.rela.ctors)     }
80  .rel.dtors     : { *(.rel.dtors)      }
81  .rela.dtors    : { *(.rela.dtors)     }
82  .rel.init      : { *(.rel.init)       }
83  .rela.init     : { *(.rela.init)      }
84  .rel.fini      : { *(.rel.fini)       }
85  .rela.fini     : { *(.rela.fini)      }
86  .rel.bss       : { *(.rel.bss)                }
87  .rela.bss      : { *(.rela.bss)               }
88  .rel.plt       : { *(.rel.plt)                }
89  .rela.plt      : { *(.rela.plt)               }
90  .init          : { *(.init)   } =0
91  .plt           : { *(.plt)    }
92  .text   .      :
93  {
94    *(.text*)
95    *(.stub)
96
97    /*
98     * Special FreeBSD sysctl sections.
99     */
100    . = ALIGN (16);
101    ___start_set_sysctl_set = .;
102    *(set_sysc*);   /* set_sysctl_* but name is truncated by SH-coff */
103    ___stop_set_sysctl_set = ABSOLUTE(.);
104    *(set_doma*);   /* set_domain_* but name is truncated by SH-coff */
105    *(set_pseu*);   /* set_pseudo_* but name is truncated by SH-coff */
106
107    /* .gnu.warning sections are handled specially by elf32.em.  */
108    *(.gnu.warning)
109    *(.gnu.linkonce.t*)
110  } > ram
111  .fini           :
112  {
113    KEEP (*(.fini))
114  } =0
115  _etext = .;
116  PROVIDE (etext = .);
117  .rodata  .  : { *(.rodata*) .rodata.* *(.gnu.linkonce.r*) }
118  .rodata1 .  : { *(.rodata1) }
119  /* Adjust the address for the data segment.  We want to adjust up to
120     the same address within the page on the next page up.  */
121  . = ALIGN(128) + (. & (128 - 1));
122  .data  .  :
123  {
124    *(.data)
125    *(.gcc_exc*)
126    ___EH_FRAME_BEGIN__ = .;
127    *(.eh_fram*)
128    ___EH_FRAME_END__ = .;
129    LONG(0);
130    *(.gcc_except_table)
131    *(.gnu.linkonce.d*)
132    CONSTRUCTORS
133  } > ram
134  .data1  . : { *(.data1) }
135  .ctors  .       :
136  {
137    ___ctors = .;
138    *(.ctors)
139    ___ctors_end = .;
140  }
141  .dtors  .       :
142  {
143    ___dtors = .;
144    *(.dtors)
145    ___dtors_end = .;
146  }
147  .got     .      : { *(.got.plt) *(.got) }
148  .dynamic .      : { *(.dynamic) }
149  /* We want the small data sections together, so single-instruction offsets
150     can access them all, and initialized data all before uninitialized, so
151     we can shorten the on-disk segment size.  */
152  .sdata   .  : { *(.sdata) }
153  _edata  =  .;
154  PROVIDE (edata = .);
155  __bss_start = .;
156  .sbss    .  : { *(.sbss*) *(.scommon) }
157  .bss     .  :
158  {
159   *(.dynbss)
160   *(.bss*)
161   *(COMMON)
162  } > ram
163  _end = . ;
164  PROVIDE (end = .);
165
166  _HeapStart = . ;
167  . = . + 1024 * 20 ;
168  PROVIDE( _HeapEnd = . );
169
170  _WorkSpaceStart = . ;
171  . = 0x00080000 ;
172  PROVIDE(_WorkSpaceEnd = .);
173
174  _CPU_Interrupt_stack_low  = 0x00080000 ;
175  _CPU_Interrupt_stack_high = _CPU_Interrupt_stack_low + 4096 ;
176
177  /* Stabs debugging sections.  */
178  .stab 0 : { *(.stab) }
179  .stabstr 0 : { *(.stabstr) }
180  .stab.excl 0 : { *(.stab.excl) }
181  .stab.exclstr 0 : { *(.stab.exclstr) }
182  .stab.index 0 : { *(.stab.index) }
183  .stab.indexstr 0 : { *(.stab.indexstr) }
184  .comment 0 : { *(.comment) }
185  /* DWARF debug sections.
186     Symbols in the DWARF debugging sections are relative to the beginning
187     of the section so we begin them at 0.  */
188  /* DWARF 1 */
189  .debug          0 : { *(.debug) }
190  .line           0 : { *(.line) }
191  /* GNU DWARF 1 extensions */
192  .debug_srcinfo  0 : { *(.debug_srcinfo) }
193  .debug_sfnames  0 : { *(.debug_sfnames) }
194  /* DWARF 1.1 and DWARF 2 */
195  .debug_aranges  0 : { *(.debug_aranges) }
196  .debug_pubnames 0 : { *(.debug_pubnames) }
197  /* DWARF 2 */
198  .debug_info     0 : { *(.debug_info) }
199  .debug_abbrev   0 : { *(.debug_abbrev) }
200  .debug_line     0 : { *(.debug_line) }
201  .debug_frame    0 : { *(.debug_frame) }
202  .debug_str      0 : { *(.debug_str) }
203  .debug_loc      0 : { *(.debug_loc) }
204  .debug_macinfo  0 : { *(.debug_macinfo) }
205  /* SGI/MIPS DWARF 2 extensions */
206  .debug_weaknames 0 : { *(.debug_weaknames) }
207  .debug_funcnames 0 : { *(.debug_funcnames) }
208  .debug_typenames 0 : { *(.debug_typenames) }
209  .debug_varnames  0 : { *(.debug_varnames) }
210
211  .stack 0x00081ff0 : { _stack = .; *(.stack) } > onchip_ram
212  /* These must appear regardless of  .  */
213}
Note: See TracBrowser for help on using the repository browser.