Back to home page

LXR

 
 

    


Warning, /bsps/sh/gensh2/start/linkcmds.rom 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 asignments represent actual SH7045F EVB architecture */
0045 _RamBase = DEFINED(_RamBase) ? _RamBase : 0x00400000;
0046 _RamSize = DEFINED(_RamSize) ? _RamSize : 0x0008000;
0047 _RamEnd = _RamBase + _RamSize;
0048 _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
0049 
0050 MEMORY
0051 {
0052   rom           : o = 0x00000000, l = 0x00040000
0053   ram           : o = 0x00400000, l = 0x00080000
0054   onchip_peri   : o = 0xFFFF8000, l = 0x00000800
0055   onchip_ram    : o = 0xFFFFF000, l = 0x00001000
0056 }
0057 
0058 
0059 /* Sections are defined for RAM loading and monitor debugging */
0060 SECTIONS
0061 {
0062   /* boot vector table */
0063   .monvects 0x00000000 (NOLOAD): {
0064     _monvects = . ;
0065   } > rom
0066 
0067   /* monitor play area */
0068   .monram 0x00400000 (NOLOAD) : 
0069   {
0070   _ramstart = .;
0071   } > ram 
0072 
0073   /* monitor vector table */
0074   .vects   0x00402000 (NOLOAD) : {
0075     _vectab = . ;
0076     *(.vects);
0077   }
0078 
0079   /* Read-only sections, merged into text segment: */
0080 
0081   . = 0x00404000 ;
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   .init          : { *(.init)   } =0
0121   .plt           : { *(.plt)    }
0122   .text   .      :
0123   {
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_pseudo_*);
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   .fini    .  : { *(.fini)    } > ram =0
0144   .rodata  .  : { *(.rodata) KEEP (*(SORT(.rtemsroset.*))) *(.gnu.linkonce.r*) } > ram
0145   .rodata1 .  : { *(.rodata1) } > ram
0146   .tdata : {
0147     __TLS_Data_begin = .;
0148     *(.tdata .tdata.* .gnu.linkonce.td.*)
0149     __TLS_Data_end = .;
0150   } > ram
0151   .tbss : {
0152     __TLS_BSS_begin = .;
0153     *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0154     __TLS_BSS_end = .;
0155   } > ram
0156   __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
0157   __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
0158   __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
0159   __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
0160   __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
0161   __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0162   /* Adjust the address for the data segment.  We want to adjust up to
0163      the same address within the page on the next page up.  */
0164   . = ALIGN(128) + (. & (128 - 1));
0165   .data  .  :
0166   {
0167     *(.data)
0168     KEEP (*(SORT(.rtemsrwset.*)))
0169     *(.gnu.linkonce.d*)
0170     CONSTRUCTORS
0171   } > ram
0172   .data1  . : { *(.data1) }
0173   .ctors  .       :
0174   {
0175     ___ctors = .;
0176     *(.ctors)
0177     ___ctors_end = .;
0178   }
0179   .dtors  .       :
0180   {
0181     ___dtors = .;
0182     *(.dtors)
0183     ___dtors_end = .;
0184   }
0185   .got     .      : { *(.got.plt) *(.got) }
0186   .dynamic .      : { *(.dynamic) }
0187   /* We want the small data sections together, so single-instruction offsets
0188      can access them all, and initialized data all before uninitialized, so
0189      we can shorten the on-disk segment size.  */
0190   .sdata   .  : { *(.sdata) }
0191   _edata  =  .;
0192   PROVIDE (edata = .);
0193   __bss_start = .;
0194   .sbss    .  : { *(.sbss*) *(.scommon) }
0195   .bss     .  :
0196   {
0197    *(.dynbss)
0198    *(.bss .bss* .gnu.linkonce.b*)
0199    *(COMMON)
0200   } > ram
0201   _end = . ;
0202   PROVIDE (end = .);
0203 
0204   .noinit (NOLOAD) : {
0205     *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0206   } > ram
0207 
0208   .rtemsstackidle (NOLOAD) : {
0209     *(SORT(.rtemsstack.idle*))
0210   } > ram
0211 
0212   _HeapStart = . ;
0213   . = . + 1024 * 20 ;
0214   PROVIDE( _HeapEnd = . );
0215 
0216   _WorkAreaBase = . ;
0217 
0218   .rtemsstack (NOLOAD) : {
0219     *(SORT(.rtemsstack.*))
0220   } > onchip_ram
0221 
0222   /* Stabs debugging sections.  */
0223   .stab 0 : { *(.stab) }
0224   .stabstr 0 : { *(.stabstr) }
0225   .stab.excl 0 : { *(.stab.excl) }
0226   .stab.exclstr 0 : { *(.stab.exclstr) }
0227   .stab.index 0 : { *(.stab.index) }
0228   .stab.indexstr 0 : { *(.stab.indexstr) }
0229   .comment 0 : { *(.comment) }
0230   /* DWARF debug sections.
0231      Symbols in the DWARF debugging sections are relative to the beginning
0232      of the section so we begin them at 0.  */
0233   /* DWARF 1 */
0234   .debug          0 : { *(.debug) }
0235   .line           0 : { *(.line) }
0236   /* GNU DWARF 1 extensions */
0237   .debug_srcinfo  0 : { *(.debug_srcinfo) }
0238   .debug_sfnames  0 : { *(.debug_sfnames) }
0239   /* DWARF 1.1 and DWARF 2 */
0240   .debug_aranges  0 : { *(.debug_aranges) }
0241   .debug_pubnames 0 : { *(.debug_pubnames) }
0242   /* DWARF 2 */
0243   .debug_info     0 : { *(.debug_info) }
0244   .debug_abbrev   0 : { *(.debug_abbrev) }
0245   .debug_line     0 : { *(.debug_line) }
0246   .debug_frame    0 : { *(.debug_frame) }
0247   .debug_str      0 : { *(.debug_str) }
0248   .debug_loc      0 : { *(.debug_loc) }
0249   .debug_macinfo  0 : { *(.debug_macinfo) }
0250   /* SGI/MIPS DWARF 2 extensions */
0251   .debug_weaknames 0 : { *(.debug_weaknames) }
0252   .debug_funcnames 0 : { *(.debug_funcnames) }
0253   .debug_typenames 0 : { *(.debug_typenames) }
0254   .debug_varnames  0 : { *(.debug_varnames) }
0255   /* These must appear regardless of  .  */
0256 }