source: rtems/c/src/lib/libbsp/sh/simsh4/startup/linkcmds @ bf511e8

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

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

  • startup/linkcmds, startup/linkcmds-le, startup/linkcmds-le.coff: Add wildcard to gcc_except_table section so programs compiled with gcc 4.3.x can link.
  • Property mode set to 100644
File size: 5.9 KB
Line 
1/*
2 * Memory layout for SH4 GNU simulator.
3 *
4 * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
5 * Author: Victor V. Vengerov <vvv@oktet.ru>
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 *
11 *
12 *  COPYRIGHT (c) 1998-2001.
13 *  On-Line Applications Research Corporation (OAR).
14 *
15 *  The license and distribution terms for this file may be
16 *  found in the file LICENSE in this distribution or at
17 *  http://www.rtems.com/license/LICENSE.
18 *
19 *  $Id$
20 */
21
22/*
23OUTPUT_FORMAT("coff-sh")
24 */
25OUTPUT_ARCH(sh)
26ENTRY(_start)
27
28_HeapSize = DEFINED(_HeapSize) ? _HeapSize : (512 * 1024);
29_WorkspaceSize = DEFINED(_WorkspaceSize) ? _WorkspaceSize : (1024 * 1024);
30
31/* These assignments load code into SH7045F EVB SRAM for monitor debugging */
32
33MEMORY
34{
35  ram           : o = 0x00000000, l = 0x01000000
36}
37
38/* Sections are defined for RAM loading and monitor debugging */
39SECTIONS
40{
41
42  /* Read-only sections, merged into text segment: */
43
44  . = 0x00004000 ;
45  .interp        : { *(.interp)         }
46  .hash          : { *(.hash)           }
47  .dynsym        : { *(.dynsym)         }
48  .dynstr        : { *(.dynstr)         }
49  .gnu.version   : { *(.gnu.version)    }
50  .gnu.version_d : { *(.gnu.version_d)  }
51  .gnu.version_r : { *(.gnu.version_r)  }
52  .rela.dyn       :
53    {
54      *(.rela.init)
55      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
56      *(.rela.fini)
57      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
58      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
59      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
60      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
61      *(.rela.ctors)
62      *(.rela.dtors)
63      *(.rela.got)
64      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
65      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
66      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
67      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
68      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
69    } >ram
70  .rel.text      :
71    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
72  .rel.data      :
73    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
74  .rel.rodata    :
75    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
76  .rel.got       : { *(.rel.got)                }
77  .rel.ctors     : { *(.rel.ctors)      }
78  .rel.dtors     : { *(.rel.dtors)      }
79  .rel.init      : { *(.rel.init)       }
80  .rel.fini      : { *(.rel.fini)       }
81  .rel.bss       : { *(.rel.bss)                }
82  .rel.plt       : { *(.rel.plt)                }
83  .init          : { *(.init)   } =0
84  .plt           : { *(.plt)    }
85  .text   .      :
86  {
87    *(.text*)
88    *(.stub)
89
90    /*
91     * Special FreeBSD sysctl sections.
92     */
93    . = ALIGN (16);
94    ___start_set_sysctl_set = .;
95    *(set_sysc*);   /* set_sysctl_* but name is truncated by SH-coff */
96    ___stop_set_sysctl_set = ABSOLUTE(.);
97    *(set_doma*);   /* set_domain_* but name is truncated by SH-coff */
98    *(set_pseu*);   /* set_pseudo_* but name is truncated by SH-coff */
99
100    /* .gnu.warning sections are handled specially by elf32.em.  */
101    *(.gnu.warning)
102    *(.gnu.linkonce.t*)
103  } > ram
104  _etext = .;
105  PROVIDE (etext = .);
106  .fini    .  : { *(.fini)    } =0
107  .rodata  .  : { *(.rodata*) *(.gnu.linkonce.r*) }
108  .rodata1 .  : { *(.rodata1) }
109  /* Adjust the address for the data segment.  We want to adjust up to
110     the same address within the page on the next page up.  */
111  . = ALIGN(128) + (. & (128 - 1));
112  .data  .  :
113  {
114    *(.data*)
115    *(.gcc_exc*)
116    ___EH_FRAME_BEGIN__ = .;
117    *(.eh_fram*)
118    ___EH_FRAME_END__ = .;
119    LONG(0);
120    *(.gcc_except_table*)
121    *(.gnu.linkonce.d*)
122    CONSTRUCTORS
123  } > ram
124  .data1  . : { *(.data1) }
125  .ctors  .       :
126  {
127    ___ctors = .;
128    *(.ctors)
129    ___ctors_end = .;
130  }
131  .dtors  .       :
132  {
133    ___dtors = .;
134    *(.dtors)
135    ___dtors_end = .;
136  }
137  .got     .      : { *(.got.plt) *(.got) }
138  .dynamic .      : { *(.dynamic) }
139  /* We want the small data sections together, so single-instruction offsets
140     can access them all, and initialized data all before uninitialized, so
141     we can shorten the on-disk segment size.  */
142  .sdata   .  : { *(.sdata) }
143  _edata  =  .;
144  PROVIDE (edata = .);
145  __bss_start = .;
146  .sbss    .  : { *(.sbss*) *(.scommon) }
147  .bss     .  :
148  {
149   *(.dynbss)
150   *(.bss .bss* .gnu.linkonce.b*)
151   *(COMMON)
152  } > ram
153  _end = . ;
154  PROVIDE (end = .);
155
156  . = ALIGN(16);
157  _HeapStart = . ;
158  . = . + _HeapSize ;
159  PROVIDE( _HeapEnd = . );
160
161  . = ALIGN(16);
162  _WorkSpaceStart = . ;
163  . = . + _WorkspaceSize ;
164  PROVIDE(_WorkSpaceEnd = .);
165
166  . = ALIGN(16);
167  .stack . : {
168     . = . + 4096;
169  }
170
171  . = ALIGN(16);
172  _CPU_Interrupt_stack_low  = . ;
173  _CPU_Interrupt_stack_high = _CPU_Interrupt_stack_low + 4096 ;
174
175  /* Stabs debugging sections.  */
176  .stab 0 : { *(.stab) }
177  .stabstr 0 : { *(.stabstr) }
178  .stab.excl 0 : { *(.stab.excl) }
179  .stab.exclstr 0 : { *(.stab.exclstr) }
180  .stab.index 0 : { *(.stab.index) }
181  .stab.indexstr 0 : { *(.stab.indexstr) }
182  .comment 0 : { *(.comment) }
183  /* DWARF debug sections.
184     Symbols in the DWARF debugging sections are relative to the beginning
185     of the section so we begin them at 0.  */
186  /* DWARF 1 */
187  .debug          0 : { *(.debug) }
188  .line           0 : { *(.line) }
189  /* GNU DWARF 1 extensions */
190  .debug_srcinfo  0 : { *(.debug_srcinfo) }
191  .debug_sfnames  0 : { *(.debug_sfnames) }
192  /* DWARF 1.1 and DWARF 2 */
193  .debug_aranges  0 : { *(.debug_aranges) }
194  .debug_pubnames 0 : { *(.debug_pubnames) }
195  /* DWARF 2 */
196  .debug_info     0 : { *(.debug_info) }
197  .debug_abbrev   0 : { *(.debug_abbrev) }
198  .debug_line     0 : { *(.debug_line) }
199  .debug_frame    0 : { *(.debug_frame) }
200  .debug_str      0 : { *(.debug_str) }
201  .debug_loc      0 : { *(.debug_loc) }
202  .debug_macinfo  0 : { *(.debug_macinfo) }
203  /* SGI/MIPS DWARF 2 extensions */
204  .debug_weaknames 0 : { *(.debug_weaknames) }
205  .debug_funcnames 0 : { *(.debug_funcnames) }
206  .debug_typenames 0 : { *(.debug_typenames) }
207  .debug_varnames  0 : { *(.debug_varnames) }
208
209}
Note: See TracBrowser for help on using the repository browser.