Back to home page

LXR

 
 

    


Warning, /bsps/sh/gensh2/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 SH7045F with main memory in area 2
0005  * This memory layout it very similar to that used for Hitachi's
0006  * EVB with CMON in FLASH
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  *      Modified to reflect SH7045F processor and EVB:
0029  *      John M. Mills (jmills@tga.com)
0030  *      TGA Technologies, Inc.
0031  *      100 Pinnacle Way, Suite 140
0032  *      Norcross, GA 30071 U.S.A.
0033  *
0034  *      This modified file may be copied and distributed in accordance
0035  *      the above-referenced license. It is provided for critique and
0036  *      developmental purposes without any warranty nor representation
0037  *      by the authors or by TGA Technologies.
0038  */
0039 
0040 OUTPUT_ARCH(sh)
0041 ENTRY(_start)
0042 STARTUP(start.o)
0043 
0044 /* These assignments load code into SH7045F EVB SRAM for monitor debugging */
0045 
0046 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x00440000;
0047 _RamSize = DEFINED(_RamSize) ? _RamSize : 512K;
0048 _RamEnd = _RamBase + _RamSize;
0049 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
0050 
0051 MEMORY
0052 {
0053   rom           : o = 0x00400000, l = 0x00040000
0054   ram           : o = 0x00440000, l = 0x00080000
0055   onchip_peri   : o = 0xFFFF8000, l = 0x00000800
0056   onchip_ram    : o = 0xFFFFF000, l = 0x00001000
0057 }
0058 
0059 /* Sections are defined for RAM loading and monitor debugging */
0060 SECTIONS
0061 {
0062   /* boot vector table */
0063   .monvects 0x00400000 (NOLOAD): {
0064     _monvects = . ;
0065   } > rom
0066 
0067   /* monitor play area */
0068   .monram 0x00440000 (NOLOAD) : 
0069   {
0070   _ramstart = .;
0071   } > ram 
0072 
0073   /* monitor vector table */
0074   .vects   0x00442000 (NOLOAD) : {
0075     _vectab = . ;
0076     *(.vects);
0077   }
0078 
0079   /* Read-only sections, merged into text segment: */
0080 
0081   . = 0x00444000 ;
0082   .interp        : { *(.interp)         }
0083   .hash          : { *(.hash)           }
0084   .dynsym        : { *(.dynsym)         }
0085   .dynstr        : { *(.dynstr)         }
0086   .gnu.version   : { *(.gnu.version)    }
0087   .gnu.version_d : { *(.gnu.version_d)  }
0088   .gnu.version_r : { *(.gnu.version_r)  }
0089   .rela.dyn       :
0090     {
0091       *(.rela.init)
0092       *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
0093       *(.rela.fini)
0094       *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
0095       *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
0096       *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
0097       *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
0098       *(.rela.ctors)
0099       *(.rela.dtors)
0100       *(.rela.got)
0101       *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
0102       *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
0103       *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
0104       *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
0105       *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
0106     } >ram
0107   .rel.text      :
0108     { *(.rel.text) *(.rel.gnu.linkonce.t*) }
0109   .rel.data      :
0110     { *(.rel.data) *(.rel.gnu.linkonce.d*) }
0111   .rel.rodata    :
0112     { *(.rel.rodata*) *(.rel.gnu.linkonce.r*) }
0113   .rel.got       : { *(.rel.got)                }
0114   .rel.ctors     : { *(.rel.ctors)      }
0115   .rel.dtors     : { *(.rel.dtors)      }
0116   .rel.init      : { *(.rel.init)       }
0117   .rel.fini      : { *(.rel.fini)       }
0118   .rel.bss       : { *(.rel.bss)                }
0119   .rel.plt       : { *(.rel.plt)                }
0120   .plt           : { *(.plt)    }
0121   .text   .      :
0122   {
0123     _start = .;
0124     *(.text*)
0125     *(.stub)
0126 
0127     /*
0128      * Special FreeBSD sysctl sections.
0129      */
0130     . = ALIGN (16);
0131     ___start_set_sysctl_set = .;
0132     *(set_sysc*);   /* set_sysctl_* but name is truncated by SH-coff */
0133     ___stop_set_sysctl_set = ABSOLUTE(.);
0134     *(set_doma*);   /* set_domain_* but name is truncated by SH-coff */
0135     *(set_pseu*);   /* set_pseudo_* but name is truncated by SH-coff */
0136 
0137     /* .gnu.warning sections are handled specially by elf32.em.  */
0138     *(.gnu.warning)
0139     *(.gnu.linkonce.t*)
0140   } > ram
0141   _etext = .;
0142   PROVIDE (etext = .);
0143   .init    .  : { KEEP(*(.init))    } > ram =0
0144   .fini    .  : { KEEP(*(.fini))    } > ram =0
0145   .ctors   .  : { KEEP(*(.ctors))    } > ram =0
0146   .dtors   .  : { KEEP(*(.dtors))    } > ram =0
0147   .rodata  .  : { *(.rodata*) KEEP (*(SORT(.rtemsroset.*))) *(.gnu.linkonce.r*) } > ram
0148   .rodata1 .  : { *(.rodata1) } > ram
0149   .tdata : {
0150     __TLS_Data_begin = .;
0151     *(.tdata .tdata.* .gnu.linkonce.td.*)
0152     __TLS_Data_end = .;
0153   } > ram
0154   .tbss : {
0155     __TLS_BSS_begin = .;
0156     *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0157     __TLS_BSS_end = .;
0158   } > ram
0159   __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
0160   __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
0161   __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
0162   __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
0163   __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
0164   __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0165   /* Adjust the address for the data segment.  We want to adjust up to
0166      the same address within the page on the next page up.  */
0167   . = ALIGN(128) + (. & (128 - 1));
0168   .data  .  :
0169   {
0170     *(.data*)
0171     KEEP (*(SORT(.rtemsrwset.*)))
0172     *(.gcc_exc*)
0173     ___EH_FRAME_BEGIN__ = .;
0174     *(.eh_fram*)
0175     ___EH_FRAME_END__ = .;
0176     LONG(0);
0177     *(.gcc_except_table*)
0178     *(.gnu.linkonce.d*)
0179     CONSTRUCTORS
0180   } > ram
0181   .data1  . : { *(.data1) }
0182   .got     .      : { *(.got.plt) *(.got) }
0183   .dynamic .      : { *(.dynamic) }
0184   /* We want the small data sections together, so single-instruction offsets
0185      can access them all, and initialized data all before uninitialized, so
0186      we can shorten the on-disk segment size.  */
0187   .sdata   .  : { *(.sdata) }
0188   _edata  =  .;
0189   PROVIDE (edata = .);
0190   __bss_start = .;
0191   .sbss    .  : { *(.sbss*) *(.scommon) }
0192   .bss     .  :
0193   {
0194    *(.dynbss)
0195    *(.bss .bss* .gnu.linkonce.b*)
0196    *(COMMON)
0197   } > ram
0198   _end = . ;
0199   PROVIDE (end = .);
0200 
0201   .noinit (NOLOAD) : {
0202     *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0203   } > ram
0204 
0205   .rtemsstackinterrupt (NOLOAD) : {
0206     *(.rtemsstack.interrupt)
0207   } > onchip_ram
0208 
0209   .rtemsstack (NOLOAD) : {
0210     *(SORT(.rtemsstack.*))
0211   } > ram
0212 
0213   _WorkAreaBase = . ;
0214 
0215   /* Stabs debugging sections.  */
0216   .stab 0 : { *(.stab) }
0217   .stabstr 0 : { *(.stabstr) }
0218   .stab.excl 0 : { *(.stab.excl) }
0219   .stab.exclstr 0 : { *(.stab.exclstr) }
0220   .stab.index 0 : { *(.stab.index) }
0221   .stab.indexstr 0 : { *(.stab.indexstr) }
0222   .comment 0 : { *(.comment) }
0223   /* DWARF debug sections.
0224      Symbols in the DWARF debugging sections are relative to the beginning
0225      of the section so we begin them at 0.  */
0226   /* DWARF 1 */
0227   .debug          0 : { *(.debug) }
0228   .line           0 : { *(.line) }
0229   /* GNU DWARF 1 extensions */
0230   .debug_srcinfo  0 : { *(.debug_srcinfo) }
0231   .debug_sfnames  0 : { *(.debug_sfnames) }
0232   /* DWARF 1.1 and DWARF 2 */
0233   .debug_aranges  0 : { *(.debug_aranges) }
0234   .debug_pubnames 0 : { *(.debug_pubnames) }
0235   /* DWARF 2 */
0236   .debug_info     0 : { *(.debug_info) }
0237   .debug_abbrev   0 : { *(.debug_abbrev) }
0238   .debug_line     0 : { *(.debug_line) }
0239   .debug_frame    0 : { *(.debug_frame) }
0240   .debug_str      0 : { *(.debug_str) }
0241   .debug_loc      0 : { *(.debug_loc) }
0242   .debug_macinfo  0 : { *(.debug_macinfo) }
0243   /* SGI/MIPS DWARF 2 extensions */
0244   .debug_weaknames 0 : { *(.debug_weaknames) }
0245   .debug_funcnames 0 : { *(.debug_funcnames) }
0246   .debug_typenames 0 : { *(.debug_typenames) }
0247   .debug_varnames  0 : { *(.debug_varnames) }
0248   /* These must appear regardless of  .  */
0249 
0250   /* Addition to let linker know about custom section for GDB pretty-printing support. */
0251   .debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
0252 }