Back to home page

LXR

 
 

    


Warning, /bsps/sh/shsim/start/linkcmds is written in an unsupported language. File is not indexed.

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