source: rtems/c/src/lib/libbsp/sh/shsim/startup/linkcmds @ 93b1e4b

4.115
Last change on this file since 93b1e4b was 93b1e4b, checked in by Joel Sherrill <joel.sherrill@…>, on 07/14/12 at 19:26:43

shsim linkcmds: Add new FreeBSD TCP/IP stack sections

  • Property mode set to 100644
File size: 6.9 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
20OUTPUT_ARCH(sh)
21ENTRY(_start)
22
23_RamBase = DEFINED(_RamBase) ? _RamBase : 0x00000000;
24_RamSize = DEFINED(_RamSize) ? _RamSize : 16M;
25_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
26
27MEMORY
28{
29/* Real memory layout submitted
30  rom           : o = 0x00000000, l = 128k
31  ram           : o = 0x00040000, l = 256k
32*/
33
34/* Memory layout which links all tests */
35  rom           : o = 0x01000000, l = 512k
36  ram           : o = 0x00040000, l = 512k
37
38  onchip_peri   : o = 0x05000000, l = 512
39}
40
41SECTIONS
42{
43  /* boot vector table */
44  .monvects (NOLOAD) :
45  {
46    _monvects = . ;
47  } > rom
48
49  /* monitor play area */
50  .monram 0x00040000 (NOLOAD) :
51  {
52  _ramstart = .;
53  } > ram
54
55  /* monitor vector table */
56  .vects   0x00042000 (NOLOAD) : {
57    _vectab = . ;
58    *(.vects);
59  }
60
61  /* Read-only sections, merged into text segment: */
62
63  . = 0x00044000 ;
64  .interp        : { *(.interp)         }
65  .hash          : { *(.hash)           }
66  .dynsym        : { *(.dynsym)         }
67  .dynstr        : { *(.dynstr)         }
68  .gnu.version   : { *(.gnu.version)    }
69  .gnu.version_d : { *(.gnu.version_d)  }
70  .gnu.version_r : { *(.gnu.version_r)  }
71  .rela.dyn       :
72    {
73      *(.rela.init)
74      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
75      *(.rela.fini)
76      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
77      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
78      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
79      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
80      *(.rela.ctors)
81      *(.rela.dtors)
82      *(.rela.got)
83      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
84      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
85      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
86      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
87      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
88    } >ram
89  .rel.text      :
90    { *(.rel.text) *(.rel.gnu.linkonce.t*) }
91  .rel.data      :
92    { *(.rel.data) *(.rel.gnu.linkonce.d*) }
93  .rel.rodata    :
94    { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
95  .rel.got       : { *(.rel.got)                }
96  .rel.ctors     : { *(.rel.ctors)      }
97  .rel.dtors     : { *(.rel.dtors)      }
98  .rel.init      : { *(.rel.init)       }
99  .rel.fini      : { *(.rel.fini)       }
100  .rel.bss       : { *(.rel.bss)                }
101  .rel.plt       : { *(.rel.plt)                }
102  .init          : { *(.init)   } =0
103  .plt           : { *(.plt)    }
104  .text   .      :
105  {
106    _start = .;
107    *(.text*)
108    *(.stub)
109
110    /*
111     * Special FreeBSD sysctl sections.
112     */
113    . = ALIGN (16);
114    ___start_set_sysctl_set = .;
115    *(set_sysc*);   /* set_sysctl_* but name is truncated by SH-coff */
116    ___stop_set_sysctl_set = ABSOLUTE(.);
117    *(set_doma*);   /* set_domain_* but name is truncated by SH-coff */
118    *(set_pseu*);   /* set_pseudo_* but name is truncated by SH-coff */
119
120    /* .gnu.warning sections are handled specially by elf32.em.  */
121    *(.gnu.warning)
122    *(.gnu.linkonce.t*)
123  } > ram
124  .fini           :
125  {
126    KEEP (*(.fini))
127  } =0
128  _etext = .;
129  PROVIDE (etext = .);
130  .rodata  .  : { *(.rodata*) .rodata.* *(.gnu.linkonce.r*) }
131  .rodata1 .  : { *(.rodata1) }
132  /* Adjust the address for the data segment.  We want to adjust up to
133     the same address within the page on the next page up.  */
134  . = ALIGN(128) + (. & (128 - 1));
135  .data  .  :
136  {
137    *(.data*)
138    *(.gcc_exc*)
139    ___EH_FRAME_BEGIN__ = .;
140    *(.eh_fram*)
141    ___EH_FRAME_END__ = .;
142    LONG(0);
143    *(.gcc_except_table*)
144    *(.gnu.linkonce.d*)
145    CONSTRUCTORS
146  } > ram
147  .data1  . : { *(.data1) }
148  .ctors  .       :
149  {
150    ___ctors = .;
151    *(.ctors)
152    ___ctors_end = .;
153  }
154  .dtors  .       :
155  {
156    ___dtors = .;
157    *(.dtors)
158    ___dtors_end = .;
159  }
160  .robsdsets : {
161    /* for pre rtems-libbsd FreeBSD code */
162    __start_set_sysctl_set = .;
163    *(set_sysctl_*);
164    __stop_set_sysctl_set = .;
165    *(set_domain_*);
166    *(set_pseudo_*);
167
168    /* for rtems-libbsd FreeBSD code */
169    __bsd__start_set_modmetadata_set = .;
170    *(_bsd_set_modmetadata_set);
171    __bsd__stop_set_modmetadata_set = .;
172
173    __bsd__start_set_sysctl_set = .;
174    *(_bsd_set_sysctl_set);
175    __bsd__stop_set_sysctl_set = .;
176
177    __bsd__start_set_sysinit_set = .;
178    *(_bsd_set_sysinit_*);
179    __bsd__stop_set_sysinit_set = .;
180
181    _bsp_section_rodata_end = .;
182  } >ram
183
184  .got     .      : { *(.got.plt) *(.got) }
185  .dynamic .      : { *(.dynamic) }
186  /* We want the small data sections together, so single-instruction offsets
187     can access them all, and initialized data all before uninitialized, so
188     we can shorten the on-disk segment size.  */
189  .sdata   .  : { *(.sdata) }
190  _edata  =  .;
191  PROVIDE (edata = .);
192  __bss_start = .;
193  .sbss    .  : { *(.sbss*) *(.scommon) }
194  .bss     .  :
195  {
196   *(.dynbss)
197   *(.bss .bss* .gnu.linkonce.b*)
198   *(COMMON)
199  } > ram
200  _end = . ;
201  PROVIDE (end = .);
202
203  .stack : {
204    . += 0x1000;
205    *(.stack)
206    _stack = .;
207  } > ram
208  _stack = .;
209
210  _WorkAreaBase = . ;
211
212  _CPU_Interrupt_stack_low  = 0x00080000 ;
213  _CPU_Interrupt_stack_high = _CPU_Interrupt_stack_low + 4096 ;
214
215  /* Stabs debugging sections.  */
216  .stab 0 : { *(.stab) }
217  .stabstr 0 : { *(.stabstr) }
218  .stab.excl 0 : { *(.stab.excl) }
219  .stab.exclstr 0 : { *(.stab.exclstr) }
220  .stab.index 0 : { *(.stab.index) }
221  .stab.indexstr 0 : { *(.stab.indexstr) }
222  .comment 0 : { *(.comment) }
223  /* DWARF debug sections.
224     Symbols in the DWARF debugging sections are relative to the beginning
225     of the section so we begin them at 0.  */
226  /* DWARF 1 */
227  .debug          0 : { *(.debug) }
228  .line           0 : { *(.line) }
229  /* GNU DWARF 1 extensions */
230  .debug_srcinfo  0 : { *(.debug_srcinfo) }
231  .debug_sfnames  0 : { *(.debug_sfnames) }
232  /* DWARF 1.1 and DWARF 2 */
233  .debug_aranges  0 : { *(.debug_aranges) }
234  .debug_pubnames 0 : { *(.debug_pubnames) }
235  /* DWARF 2 */
236  .debug_info     0 : { *(.debug_info) }
237  .debug_abbrev   0 : { *(.debug_abbrev) }
238  .debug_line     0 : { *(.debug_line) }
239  .debug_frame    0 : { *(.debug_frame) }
240  .debug_str      0 : { *(.debug_str) }
241  .debug_loc      0 : { *(.debug_loc) }
242  .debug_macinfo  0 : { *(.debug_macinfo) }
243  /* SGI/MIPS DWARF 2 extensions */
244  .debug_weaknames 0 : { *(.debug_weaknames) }
245  .debug_funcnames 0 : { *(.debug_funcnames) }
246  .debug_typenames 0 : { *(.debug_typenames) }
247  .debug_varnames  0 : { *(.debug_varnames) }
248
249/*
250  .stack 0x00081ff0 : { _stack = .; *(.stack) } > onchip_ram
251*/
252  /* These must appear regardless of  .  */
253}
Note: See TracBrowser for help on using the repository browser.