source: rtems/c/src/lib/libbsp/sh/shsim/startup/linkcmds @ 5926e0a1

4.104.114.95
Last change on this file since 5926e0a1 was 5926e0a1, checked in by Joel Sherrill <joel.sherrill@…>, on 03/03/08 at 23:07:50

2008-03-03 Joel Sherrill <joel.sherrill@…>

  • startup/linkcmds, startup/linkcmds.sim: Add wildcard to gcc_except_table section so programs compiled with gcc 4.3.x can link.
  • Property mode set to 100644
File size: 6.2 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/* Real memory layout submitted
28  rom           : o = 0x00000000, l = 128k
29  ram           : o = 0x00040000, l = 256k
30*/
31
32/* Memory layout which links all tests */
33  rom           : o = 0x01000000, l = 512k
34  ram           : o = 0x00040000, l = 512k
35
36  onchip_peri   : o = 0x05000000, l = 512
37}
38
39SECTIONS
40{
41  /* boot vector table */
42  .monvects 0x00000000 (NOLOAD) :
43  {
44    _monvects = . ;
45  } > rom
46
47  /* monitor play area */
48  .monram 0x00040000 (NOLOAD) :
49  {
50  _ramstart = .;
51  } > ram
52
53  /* monitor vector table */
54  .vects   0x00042000 (NOLOAD) : {
55    _vectab = . ;
56    *(.vects);
57  }
58
59  /* Read-only sections, merged into text segment: */
60
61  . = 0x00044000 ;
62  .interp        : { *(.interp)         }
63  .hash          : { *(.hash)           }
64  .dynsym        : { *(.dynsym)         }
65  .dynstr        : { *(.dynstr)         }
66  .gnu.version   : { *(.gnu.version)    }
67  .gnu.version_d : { *(.gnu.version_d)  }
68  .gnu.version_r : { *(.gnu.version_r)  }
69  .rela.dyn       :
70    {
71      *(.rela.init)
72      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
73      *(.rela.fini)
74      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
75      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
76      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
77      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
78      *(.rela.ctors)
79      *(.rela.dtors)
80      *(.rela.got)
81      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
82      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
83      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
84      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
85      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
86    } >ram
87  .rel.text      :
88    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
89  .rel.data      :
90    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
91  .rel.rodata    :
92    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
93  .rel.got       : { *(.rel.got)                }
94  .rel.ctors     : { *(.rel.ctors)      }
95  .rel.dtors     : { *(.rel.dtors)      }
96  .rel.init      : { *(.rel.init)       }
97  .rel.fini      : { *(.rel.fini)       }
98  .rel.bss       : { *(.rel.bss)                }
99  .rel.plt       : { *(.rel.plt)                }
100  .init          : { *(.init)   } =0
101  .plt           : { *(.plt)    }
102  .text   .      :
103  {
104    *(.text*)
105    *(.stub)
106
107    /*
108     * Special FreeBSD sysctl sections.
109     */
110    . = ALIGN (16);
111    ___start_set_sysctl_set = .;
112    *(set_sysc*);   /* set_sysctl_* but name is truncated by SH-coff */
113    ___stop_set_sysctl_set = ABSOLUTE(.);
114    *(set_doma*);   /* set_domain_* but name is truncated by SH-coff */
115    *(set_pseu*);   /* set_pseudo_* but name is truncated by SH-coff */
116
117    /* .gnu.warning sections are handled specially by elf32.em.  */
118    *(.gnu.warning)
119    *(.gnu.linkonce.t*)
120  } > ram
121  .fini           :
122  {
123    KEEP (*(.fini))
124  } =0
125  _etext = .;
126  PROVIDE (etext = .);
127  .rodata  .  : { *(.rodata*) .rodata.* *(.gnu.linkonce.r*) }
128  .rodata1 .  : { *(.rodata1) }
129  /* Adjust the address for the data segment.  We want to adjust up to
130     the same address within the page on the next page up.  */
131  . = ALIGN(128) + (. & (128 - 1));
132  .data  .  :
133  {
134    *(.data*)
135    *(.gcc_exc*)
136    ___EH_FRAME_BEGIN__ = .;
137    *(.eh_fram*)
138    ___EH_FRAME_END__ = .;
139    LONG(0);
140    *(.gcc_except_table*)
141    *(.gnu.linkonce.d*)
142    CONSTRUCTORS
143  } > ram
144  .data1  . : { *(.data1) }
145  .ctors  .       :
146  {
147    ___ctors = .;
148    *(.ctors)
149    ___ctors_end = .;
150  }
151  .dtors  .       :
152  {
153    ___dtors = .;
154    *(.dtors)
155    ___dtors_end = .;
156  }
157  .got     .      : { *(.got.plt) *(.got) }
158  .dynamic .      : { *(.dynamic) }
159  /* We want the small data sections together, so single-instruction offsets
160     can access them all, and initialized data all before uninitialized, so
161     we can shorten the on-disk segment size.  */
162  .sdata   .  : { *(.sdata) }
163  _edata  =  .;
164  PROVIDE (edata = .);
165  __bss_start = .;
166  .sbss    .  : { *(.sbss*) *(.scommon) }
167  .bss     .  :
168  {
169   *(.dynbss)
170   *(.bss .bss* .gnu.linkonce.b*)
171   *(COMMON)
172  } > ram
173  _end = . ;
174  PROVIDE (end = .);
175
176  _HeapStart = . ;
177  . = . + 1024 * 20 ;
178  PROVIDE( _HeapEnd = . );
179
180  _WorkSpaceStart = . ;
181  /* XXX . = 0x00080000 ; */
182  PROVIDE(_WorkSpaceEnd = .);
183
184  _CPU_Interrupt_stack_low  = 0x00080000 ;
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
221  .stack /* 0x00081ff0 */: { _stack = .; *(.stack) } > ram /* > onchip_ram */
222  /* These must appear regardless of  .  */
223}
Note: See TracBrowser for help on using the repository browser.