Warning, /bsps/sh/gensh1/start/linkcmds is written in an unsupported language. File is not indexed.
0001 /*
0002 * This is an adapted linker script from egcs-1.0.1
0003 *
0004 * Memory layout for an SH 7032 with main memory in area 2
0005 * This memory layout it very similar to that used for Hitachi's
0006 * EVB with CMON in rom
0007 *
0008 * NOTE: The ram start address may vary, all other start addresses are fixed
0009 * Not suiteable for gdb's simulator
0010 *
0011 * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
0012 * Bernd Becker (becker@faw.uni-ulm.de)
0013 *
0014 * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
0015 *
0016 * This program is distributed in the hope that it will be useful,
0017 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
0019 *
0020 *
0021 * COPYRIGHT (c) 1998.
0022 * On-Line Applications Research Corporation (OAR).
0023 *
0024 * The license and distribution terms for this file may be
0025 * found in the file LICENSE in this distribution or at
0026 * http://www.rtems.org/license/LICENSE.
0027 */
0028
0029 OUTPUT_ARCH(sh)
0030 ENTRY(_start)
0031 STARTUP(start.o)
0032
0033 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x0a040000;
0034 _RamSize = DEFINED(_RamSize) ? _RamSize : 512K;
0035 _RamEnd = _RamBase + _RamSize;
0036 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
0037
0038 MEMORY
0039 {
0040 rom : o = 0x00000000, l = 128k
0041 onchip_peri : o = 0x05000000, l = 512
0042 ram : o = 0x0A040000, l = 512k /* enough to link all tests */
0043
0044 onchip_ram : o = 0x0f000000, l = 8k
0045 }
0046
0047 SECTIONS
0048 {
0049 /* boot vector table */
0050 .monvects 0x00000000 (NOLOAD): {
0051 _monvects = . ;
0052 } > rom
0053
0054 /* monitor play area */
0055 .monram 0x0A040000 (NOLOAD) :
0056 {
0057 _ramstart = .;
0058 } > ram
0059
0060 /* monitor vector table */
0061 .vects 0x0A042000 (NOLOAD) : {
0062 _vectab = . ;
0063 *(.vects);
0064 }
0065
0066 /* Read-only sections, merged into text segment: */
0067
0068 . = 0x0a044000 ;
0069 .interp : { *(.interp) }
0070 .hash : { *(.hash) }
0071 .dynsym : { *(.dynsym) }
0072 .dynstr : { *(.dynstr) }
0073 .gnu.version : { *(.gnu.version) }
0074 .gnu.version_d : { *(.gnu.version_d) }
0075 .gnu.version_r : { *(.gnu.version_r) }
0076 .rela.dyn :
0077 {
0078 *(.rela.init)
0079 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
0080 *(.rela.fini)
0081 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
0082 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
0083 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
0084 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
0085 *(.rela.ctors)
0086 *(.rela.dtors)
0087 *(.rela.got)
0088 *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
0089 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
0090 *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
0091 *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
0092 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
0093 } >ram
0094 .rel.text :
0095 { *(.rel.text) *(.rel.gnu.linkonce.t*) }
0096 .rel.data :
0097 { *(.rel.data) *(.rel.gnu.linkonce.d*) }
0098 .rel.rodata :
0099 { *(.rel.rodata*) *(.rel.gnu.linkonce.r*) }
0100 .rel.got : { *(.rel.got) }
0101 .rel.ctors : { *(.rel.ctors) }
0102 .rel.dtors : { *(.rel.dtors) }
0103 .rel.init : { *(.rel.init) }
0104 .rel.fini : { *(.rel.fini) }
0105 .rel.bss : { *(.rel.bss) }
0106 .rel.plt : { *(.rel.plt) }
0107 .plt : { *(.plt) }
0108 .text . :
0109 {
0110 _start = .;
0111 *(.text*)
0112 *(.stub)
0113
0114 /*
0115 * Special FreeBSD sysctl sections.
0116 */
0117 . = ALIGN (16);
0118 __start_set_sysctl_set = .;
0119 ___start_set_sysctl_set = .;
0120 *(set_sysc*); /* set_sysctl_* but name is truncated by SH-coff */
0121 __stop_set_sysctl_set = ABSOLUTE(.);
0122 ___stop_set_sysctl_set = ABSOLUTE(.);
0123 *(set_doma*); /* set_domain_* but name is truncated by SH-coff */
0124 *(set_pseu*); /* set_pseudo_* but name is truncated by SH-coff */
0125
0126 /* .gnu.warning sections are handled specially by elf32.em. */
0127 *(.gnu.warning)
0128 *(.gnu.linkonce.t*)
0129 } > ram
0130 _etext = .;
0131 PROVIDE (etext = .);
0132 .init . : { KEEP(*(.init)) } > ram =0
0133 .fini . : { KEEP(*(.fini)) } > ram =0
0134 .ctors . : { KEEP(*(.ctors)) } > ram =0
0135 .dtors . : { KEEP(*(.dtors)) } > ram =0
0136 .rodata . : { *(.rodata*) KEEP (*(SORT(.rtemsroset.*))) *(.gnu.linkonce.r*) } > ram
0137 .rodata1 . : { *(.rodata1) } > ram
0138 .tdata : {
0139 __TLS_Data_begin = .;
0140 *(.tdata .tdata.* .gnu.linkonce.td.*)
0141 __TLS_Data_end = .;
0142 } > ram
0143 .tbss : {
0144 __TLS_BSS_begin = .;
0145 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0146 __TLS_BSS_end = .;
0147 } > ram
0148 __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
0149 __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
0150 __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
0151 __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
0152 __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
0153 __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0154 /* Adjust the address for the data segment. We want to adjust up to
0155 the same address within the page on the next page up. */
0156 . = ALIGN(128) + (. & (128 - 1));
0157 .data . :
0158 {
0159 *(.data*)
0160 KEEP (*(SORT(.rtemsrwset.*)))
0161 *(.gcc_exc*)
0162 ___EH_FRAME_BEGIN__ = .;
0163 *(.eh_fram*)
0164 ___EH_FRAME_END__ = .;
0165 LONG(0);
0166 *(.gcc_except_table*)
0167 *(.gnu.linkonce.d*)
0168 CONSTRUCTORS
0169 } > ram
0170 .data1 . : { *(.data1) }
0171 .got . : { *(.got.plt) *(.got) }
0172 .dynamic . : { *(.dynamic) }
0173 /* We want the small data sections together, so single-instruction offsets
0174 can access them all, and initialized data all before uninitialized, so
0175 we can shorten the on-disk segment size. */
0176 .sdata . : { *(.sdata) }
0177 _edata = .;
0178 PROVIDE (edata = .);
0179 __bss_start = .;
0180 .sbss . : { *(.sbss*) *(.scommon) }
0181 .bss . :
0182 {
0183 *(.dynbss)
0184 *(.bss .bss* .gnu.linkonce.b*)
0185 *(COMMON)
0186 } > ram
0187 _end = . ;
0188 PROVIDE (end = .);
0189
0190 .noinit (NOLOAD) : {
0191 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0192 } > ram
0193
0194 .rtemsstackinterrupt (NOLOAD) : {
0195 *(.rtemsstack.interrupt)
0196 } > onchip_ram
0197
0198 .rtemsstack (NOLOAD) : {
0199 *(SORT(.rtemsstack.*))
0200 } > ram
0201
0202 _WorkAreaBase = . ;
0203
0204 /* Stabs debugging sections. */
0205 .stab 0 : { *(.stab) }
0206 .stabstr 0 : { *(.stabstr) }
0207 .stab.excl 0 : { *(.stab.excl) }
0208 .stab.exclstr 0 : { *(.stab.exclstr) }
0209 .stab.index 0 : { *(.stab.index) }
0210 .stab.indexstr 0 : { *(.stab.indexstr) }
0211 .comment 0 : { *(.comment) }
0212 /* DWARF debug sections.
0213 Symbols in the DWARF debugging sections are relative to the beginning
0214 of the section so we begin them at 0. */
0215 /* DWARF 1 */
0216 .debug 0 : { *(.debug) }
0217 .line 0 : { *(.line) }
0218 /* GNU DWARF 1 extensions */
0219 .debug_srcinfo 0 : { *(.debug_srcinfo) }
0220 .debug_sfnames 0 : { *(.debug_sfnames) }
0221 /* DWARF 1.1 and DWARF 2 */
0222 .debug_aranges 0 : { *(.debug_aranges) }
0223 .debug_pubnames 0 : { *(.debug_pubnames) }
0224 /* DWARF 2 */
0225 .debug_info 0 : { *(.debug_info) }
0226 .debug_abbrev 0 : { *(.debug_abbrev) }
0227 .debug_line 0 : { *(.debug_line) }
0228 .debug_frame 0 : { *(.debug_frame) }
0229 .debug_str 0 : { *(.debug_str) }
0230 .debug_loc 0 : { *(.debug_loc) }
0231 .debug_macinfo 0 : { *(.debug_macinfo) }
0232 /* SGI/MIPS DWARF 2 extensions */
0233 .debug_weaknames 0 : { *(.debug_weaknames) }
0234 .debug_funcnames 0 : { *(.debug_funcnames) }
0235 .debug_typenames 0 : { *(.debug_typenames) }
0236 .debug_varnames 0 : { *(.debug_varnames) }
0237 /* These must appear regardless of . */
0238
0239 /* Addition to let linker know about custom section for GDB pretty-printing support. */
0240 .debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
0241 }