Warning, /bsps/sh/gensh4/start/linkcmds is written in an unsupported language. File is not indexed.
0001 /*
0002 * This file contains GNU linker directives for an general SH4
0003 * board.
0004 *
0005 * Variations in memory size and allocation can be made by
0006 * overriding some values with linker command-line arguments.
0007 *
0008 * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia
0009 * Author: Victor V. Vengerov <vvv@oktet.ru>
0010 *
0011 * The license and distribution terms for this file may be
0012 * found in the file LICENSE in this distribution or at
0013 *
0014 * http://www.rtems.org/license/LICENSE.
0015 */
0016
0017
0018 OUTPUT_ARCH(sh)
0019 ENTRY(_start)
0020 STARTUP(start.o)
0021
0022 /* Do we need any of these for elf?
0023 __DYNAMIC = 0; */
0024
0025 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
0026 _RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
0027 _RamEnd = _RamBase + _RamSize;
0028 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
0029
0030 /*
0031 * Area assignments:
0032 * Area 0: Flash memory, SRAM interface
0033 * Area 1: GDC
0034 * Area 2: SDRAM
0035 * Area 3-6: unused
0036 */
0037 MEMORY
0038 {
0039 ram : o = 0x88100000, l = 7M
0040 rom : o = 0x80000000, l = 4M
0041 }
0042
0043 SECTIONS
0044 {
0045 /* Read-only sections, merged into text segment: */
0046 .text :
0047 {
0048 _start = .;
0049 *(.text*)
0050
0051 /*
0052 * Special FreeBSD sysctl sections.
0053 */
0054 . = ALIGN (16);
0055 ___start_set_sysctl_set = .;
0056 *(set_sysc*); /* set_sysctl_* but name is truncated by SH-coff */
0057 ___stop_set_sysctl_set = ABSOLUTE(.);
0058 *(set_doma*); /* set_domain_* but name is truncated by SH-coff */
0059 *(set_pseu*); /* set_pseudo_* but name is truncated by SH-coff */
0060
0061 /* .gnu.warning sections are handled specially by elf32.em. */
0062 *(.gnu.warning)
0063 *(.gnu.linkonce.t*)
0064 } > ram
0065 .rela.dyn :
0066 {
0067 *(.rela.init)
0068 *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
0069 *(.rela.fini)
0070 *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
0071 *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
0072 *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
0073 *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
0074 *(.rela.ctors)
0075 *(.rela.dtors)
0076 *(.rela.got)
0077 *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
0078 *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
0079 *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
0080 *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
0081 *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
0082 } >ram
0083 _etext = .;
0084 PROVIDE (etext = .);
0085 .init . : { KEEP(*(.init)) } > ram =0
0086 .fini . : { KEEP(*(.fini)) } > ram =0
0087 .ctors . : { KEEP(*(.ctors)) } > ram =0
0088 .dtors . : { KEEP(*(.dtors)) } > ram =0
0089 .rodata :
0090 {
0091 *(.rodata)
0092 *(.rodata.*)
0093 KEEP (*(SORT(.rtemsroset.*)))
0094 *(.gnu.linkonce.r*)
0095 } > ram
0096 .tdata : {
0097 __TLS_Data_begin = .;
0098 *(.tdata .tdata.* .gnu.linkonce.td.*)
0099 __TLS_Data_end = .;
0100 } > ram
0101 .tbss : {
0102 __TLS_BSS_begin = .;
0103 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0104 __TLS_BSS_end = .;
0105 } > ram
0106 __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
0107 __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
0108 __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
0109 __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
0110 __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
0111 __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0112
0113 /* Adjust the address for the data segment. We want to adjust up to
0114 the same address within the page on the next page up. */
0115 . = ALIGN(128) + (. & (128 - 1));
0116 .data :
0117 {
0118 copy_start = .;
0119 *(.data*)
0120 KEEP (*(SORT(.rtemsrwset.*)))
0121 *(.gcc_exc*)
0122 ___EH_FRAME_BEGIN__ = .;
0123 *(.eh_fram*)
0124 ___EH_FRAME_END__ = .;
0125 LONG(0);
0126 *(.gcc_except_table*)
0127 *(.gnu.linkonce.d*)
0128 SORT(CONSTRUCTORS)
0129 copy_end = .;
0130 } > ram
0131 .eh_frame : { *(.eh_frame) } > ram
0132 /* We want the small data sections together, so single-instruction offsets
0133 can access them all, and initialized data all before uninitialized, so
0134 we can shorten the on-disk segment size. */
0135 .bss :
0136 {
0137 __bss_start = .;
0138 *(.dynbss)
0139 *(.bss .bss* .gnu.linkonce.b*)
0140 *(COMMON)
0141 /* Align here to ensure that the .bss section occupies space up to
0142 _end. Align after .bss to ensure correct alignment even if the
0143 .bss section disappears because there are no input sections. */
0144 . = ALIGN(32 / 8);
0145 __bss_end = .;
0146 } > ram
0147
0148 .noinit (NOLOAD) : {
0149 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0150 } > ram
0151
0152 .rtemsstack (NOLOAD) : {
0153 *(SORT(.rtemsstack.*))
0154 } > ram
0155
0156 _WorkAreaBase = . ;
0157
0158 /* Stabs debugging sections. */
0159 .stab 0 : { *(.stab) }
0160 .stabstr 0 : { *(.stabstr) }
0161 .stab.excl 0 : { *(.stab.excl) }
0162 .stab.exclstr 0 : { *(.stab.exclstr) }
0163 .stab.index 0 : { *(.stab.index) }
0164 .stab.indexstr 0 : { *(.stab.indexstr) }
0165 .comment 0 : { *(.comment) }
0166 /* DWARF debug sections.
0167 Symbols in the DWARF debugging sections are relative to the beginning
0168 of the section so we begin them at 0. */
0169 /* DWARF 1 */
0170 .debug 0 : { *(.debug) }
0171 .line 0 : { *(.line) }
0172 /* GNU DWARF 1 extensions */
0173 .debug_srcinfo 0 : { *(.debug_srcinfo) }
0174 .debug_sfnames 0 : { *(.debug_sfnames) }
0175 /* DWARF 1.1 and DWARF 2 */
0176 .debug_aranges 0 : { *(.debug_aranges) }
0177 .debug_pubnames 0 : { *(.debug_pubnames) }
0178 /* DWARF 2 */
0179 .debug_info 0 : { *(.debug_info) }
0180 .debug_abbrev 0 : { *(.debug_abbrev) }
0181 .debug_line 0 : { *(.debug_line) }
0182 .debug_frame 0 : { *(.debug_frame) }
0183 .debug_str 0 : { *(.debug_str) }
0184 .debug_loc 0 : { *(.debug_loc) }
0185 .debug_macinfo 0 : { *(.debug_macinfo) }
0186 /* SGI/MIPS DWARF 2 extensions */
0187 .debug_weaknames 0 : { *(.debug_weaknames) }
0188 .debug_funcnames 0 : { *(.debug_funcnames) }
0189 .debug_typenames 0 : { *(.debug_typenames) }
0190 .debug_varnames 0 : { *(.debug_varnames) }
0191 /* These must appear regardless of . */
0192
0193 /* Addition to let linker know about custom section for GDB pretty-printing support. */
0194 .debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
0195 }