Back to home page

LXR

 
 

    


Warning, /bsps/sh/gensh2/start/linkcmds.ram 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 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x00440000;
0046 _RamSize = DEFINED(_RamSize) ? _RamSize : 512K;
0047 _RamEnd = _RamBase + _RamSize;
0048 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
0049 
0050 MEMORY
0051 {
0052   rom           : o = 0x00400000, l = 0x00040000
0053   ram           : o = 0x00440000, l = 0x00080000
0054   onchip_peri   : o = 0xFFFF8000, l = 0x00000800
0055   onchip_ram    : o = 0xFFFFF000, l = 0x00001000
0056 }
0057 
0058 /* Sections are defined for RAM loading and monitor debugging */
0059 SECTIONS
0060 {
0061   /* boot vector table */
0062   .monvects 0x00400000 (NOLOAD): {
0063     _monvects = . ;
0064   } > rom
0065 
0066   /* monitor play area */
0067   .monram 0x00440000 (NOLOAD) : 
0068   {
0069   _ramstart = .;
0070   } > ram 
0071 
0072   /* monitor vector table */
0073   .vects   0x00442000 (NOLOAD) : {
0074     _vectab = . ;
0075     *(.vects);
0076   }
0077 
0078   /* Read-only sections, merged into text segment: */
0079 
0080   . = 0x00444000 ;
0081   .interp        : { *(.interp)         }
0082   .hash          : { *(.hash)           }
0083   .dynsym        : { *(.dynsym)         }
0084   .dynstr        : { *(.dynstr)         }
0085   .gnu.version   : { *(.gnu.version)    }
0086   .gnu.version_d : { *(.gnu.version_d)  }
0087   .gnu.version_r : { *(.gnu.version_r)  }
0088   .rela.dyn       :
0089     {
0090       *(.rela.init)
0091       *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
0092       *(.rela.fini)
0093       *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
0094       *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
0095       *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
0096       *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
0097       *(.rela.ctors)
0098       *(.rela.dtors)
0099       *(.rela.got)
0100       *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
0101       *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
0102       *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
0103       *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
0104       *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
0105     } >ram
0106   .rel.text      :
0107     { *(.rel.text) *(.rel.gnu.linkonce.t*) }
0108   .rel.data      :
0109     { *(.rel.data) *(.rel.gnu.linkonce.d*) }
0110   .rel.rodata    :
0111     { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
0112   .rel.got       : { *(.rel.got)                }
0113   .rel.ctors     : { *(.rel.ctors)      }
0114   .rel.dtors     : { *(.rel.dtors)      }
0115   .rel.init      : { *(.rel.init)       }
0116   .rel.fini      : { *(.rel.fini)       }
0117   .rel.bss       : { *(.rel.bss)                }
0118   .rel.plt       : { *(.rel.plt)                }
0119   .init          : { *(.init)   } =0
0120   .plt           : { *(.plt)    }
0121   .text   .      :
0122   {
0123     *(.text*)
0124     *(.stub)
0125 
0126     /*
0127      * Special FreeBSD sysctl sections.
0128      */
0129     . = ALIGN (16);
0130     ___start_set_sysctl_set = .;
0131     *(set_sysc*);   /* set_sysctl_* but name is truncated by SH-coff */
0132     ___stop_set_sysctl_set = ABSOLUTE(.);
0133     *(set_doma*);   /* set_domain_* but name is truncated by SH-coff */
0134     *(set_pseudo_*);
0135 
0136     /* .gnu.warning sections are handled specially by elf32.em.  */
0137     *(.gnu.warning)
0138     *(.gnu.linkonce.t*)
0139   } > ram
0140   _etext = .;
0141   PROVIDE (etext = .);
0142   .fini    .  : { *(.fini)    } > ram =0
0143   .rodata  .  : { *(.rodata) KEEP (*(SORT(.rtemsroset.*))) *(.gnu.linkonce.r*) } > ram
0144   .rodata1 .  : { *(.rodata1) } > ram
0145   .tdata : {
0146     __TLS_Data_begin = .;
0147     *(.tdata .tdata.* .gnu.linkonce.td.*)
0148     __TLS_Data_end = .;
0149   } > ram
0150   .tbss : {
0151     __TLS_BSS_begin = .;
0152     *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0153     __TLS_BSS_end = .;
0154   } > ram
0155   __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
0156   __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
0157   __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
0158   __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
0159   __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
0160   __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0161   /* Adjust the address for the data segment.  We want to adjust up to
0162      the same address within the page on the next page up.  */
0163   . = ALIGN(128) + (. & (128 - 1));
0164   .data  .  :
0165   {
0166     *(.data)
0167     KEEP (*(SORT(.rtemsrwset.*)))
0168     *(.gnu.linkonce.d*)
0169     CONSTRUCTORS
0170   } > ram
0171   .data1  . : { *(.data1) }
0172   .ctors  .       :
0173   {
0174     ___ctors = .;
0175     *(.ctors)
0176     ___ctors_end = .;
0177   }
0178   .dtors  .       :
0179   {
0180     ___dtors = .;
0181     *(.dtors)
0182     ___dtors_end = .;
0183   }
0184   .got     .      : { *(.got.plt) *(.got) }
0185   .dynamic .      : { *(.dynamic) }
0186   /* We want the small data sections together, so single-instruction offsets
0187      can access them all, and initialized data all before uninitialized, so
0188      we can shorten the on-disk segment size.  */
0189   .sdata   .  : { *(.sdata) }
0190   _edata  =  .;
0191   PROVIDE (edata = .);
0192   __bss_start = .;
0193   .sbss    .  : { *(.sbss*) *(.scommon) }
0194   .bss     .  :
0195   {
0196    *(.dynbss)
0197    *(.bss .bss* .gnu.linkonce.b*)
0198    *(COMMON)
0199   } > ram
0200   _end = . ;
0201   PROVIDE (end = .);
0202 
0203   .noinit (NOLOAD) : {
0204     *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0205   } > ram
0206 
0207   .rtemsstackidle (NOLOAD) : {
0208     *(SORT(.rtemsstack.idle*))
0209   } > ram
0210 
0211   _WorkAreaBase = . ;
0212 
0213   .rtemsstack (NOLOAD) : {
0214     *(SORT(.rtemsstack.*))
0215   } > onchip_ram
0216 
0217   /* Stabs debugging sections.  */
0218   .stab 0 : { *(.stab) }
0219   .stabstr 0 : { *(.stabstr) }
0220   .stab.excl 0 : { *(.stab.excl) }
0221   .stab.exclstr 0 : { *(.stab.exclstr) }
0222   .stab.index 0 : { *(.stab.index) }
0223   .stab.indexstr 0 : { *(.stab.indexstr) }
0224   .comment 0 : { *(.comment) }
0225   /* DWARF debug sections.
0226      Symbols in the DWARF debugging sections are relative to the beginning
0227      of the section so we begin them at 0.  */
0228   /* DWARF 1 */
0229   .debug          0 : { *(.debug) }
0230   .line           0 : { *(.line) }
0231   /* GNU DWARF 1 extensions */
0232   .debug_srcinfo  0 : { *(.debug_srcinfo) }
0233   .debug_sfnames  0 : { *(.debug_sfnames) }
0234   /* DWARF 1.1 and DWARF 2 */
0235   .debug_aranges  0 : { *(.debug_aranges) }
0236   .debug_pubnames 0 : { *(.debug_pubnames) }
0237   /* DWARF 2 */
0238   .debug_info     0 : { *(.debug_info) }
0239   .debug_abbrev   0 : { *(.debug_abbrev) }
0240   .debug_line     0 : { *(.debug_line) }
0241   .debug_frame    0 : { *(.debug_frame) }
0242   .debug_str      0 : { *(.debug_str) }
0243   .debug_loc      0 : { *(.debug_loc) }
0244   .debug_macinfo  0 : { *(.debug_macinfo) }
0245   /* SGI/MIPS DWARF 2 extensions */
0246   .debug_weaknames 0 : { *(.debug_weaknames) }
0247   .debug_funcnames 0 : { *(.debug_funcnames) }
0248   .debug_typenames 0 : { *(.debug_typenames) }
0249   .debug_varnames  0 : { *(.debug_varnames) }
0250   /* These must appear regardless of  .  */
0251 }