Back to home page

LXR

 
 

    


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

0001 /*
0002  * This file contains GNU linker directives for an MCF5206eLITE
0003  * evaluation 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  * This file based on work:
0012  * David Fiddes, D.J.Fiddes@hw.ac.uk
0013  * http://www.calm.hw.ac.uk/davidf/coldfire/
0014  *
0015  * The license and distribution terms for this file may be
0016  * found in the file LICENSE in this distribution or at
0017  *
0018  * http://www.rtems.org/license/LICENSE.
0019  */
0020 
0021 /*
0022  * Declare some sizes.
0023  * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
0024  *      number used there is not constant.  If this happens to you, edit
0025  *      the lines marked XXX below to use a constant value.
0026  */
0027 
0028 /*
0029  * Declare system clock frequency.
0030  */
0031 _SYS_CLOCK_FREQUENCY = DEFINED(_SYS_CLOCK_FREQUENCY) ?
0032                                _SYS_CLOCK_FREQUENCY : 54000000;
0033 
0034 /*
0035  * Declare size of heap.
0036  * A heap size of 0 means "Use all available memory for the heap".
0037  * Initial stack located in on-chip SRAM and not declared there.
0038  */
0039 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
0040 RamBase = DEFINED(RamBase) ? RamBase : 0x30000000;
0041 RamSize = DEFINED(RamSize) ? RamSize : 0x00100000;
0042 RamEnd = RamBase + RamSize;
0043 
0044 /*
0045  * Setup the memory map of the MCF5206eLITE evaluation board
0046  *
0047  * The "rom" section is in USER Flash on the board
0048  * The "ram" section is placed in USER RAM starting at 10000h
0049  * 
0050  */
0051 MEMORY
0052 {
0053   ram     : ORIGIN = 0x30000000, LENGTH = 0x00100000
0054   rom     : ORIGIN = 0xFFE20000, LENGTH = 128k 
0055 }
0056 
0057 MBase = 0x10000000;
0058 
0059 ENTRY(start)
0060 STARTUP(start.o)
0061 
0062 /* Interrupt Vector table located at start of external static RAM */
0063 _VBR = 0x30000000;
0064 
0065 SECTIONS
0066 {
0067      
0068   /*
0069    * Dynamic RAM
0070    */
0071   ram : {
0072           RamBase = .;
0073           RamBase = .;
0074           /* Reserve space for interrupt table */
0075           . += 0x400;
0076   } >ram 
0077 
0078   /*
0079    * Text, data and bss segments
0080    */
0081    .text : {
0082            CREATE_OBJECT_SYMBOLS
0083            *(.text*)
0084 
0085            /*
0086             * C++ constructors/destructors
0087             */
0088            *(.gnu.linkonce.t.*)
0089 
0090            /*
0091             * Initialization and finalization code.
0092             */
0093            . = ALIGN (16);
0094            PROVIDE (_init = .);
0095            *crti.o(.init)
0096            *(.init)
0097            *crtn.o(.init)
0098            . = ALIGN (16);
0099            PROVIDE (_fini = .);
0100            *crti.o(.fini)
0101            *(.fini)
0102            *crtn.o(.fini)
0103 
0104            /*
0105             * Special FreeBSD sysctl sections.
0106             */
0107            . = ALIGN (16);
0108            __start_set_sysctl_set = .;
0109            *(set_sysctl_*);
0110            __stop_set_sysctl_set = ABSOLUTE(.);
0111            *(set_domain_*);
0112            *(set_pseudo_*);
0113 
0114            /*
0115             * C++ constructors/destructors
0116             */
0117            . = ALIGN (16);
0118            *crtbegin.o(.ctors)
0119            *(.ctors)
0120            *crtend.o(.ctors)
0121            *crtbegin.o(.dtors)
0122            *(.dtors)
0123            *crtend.o(.dtors)
0124 
0125            /*
0126             * Exception frame info
0127             */
0128            . = ALIGN (16);
0129            *(.eh_frame)
0130 
0131            /*
0132             * Read-only data
0133             */
0134            . = ALIGN (16);
0135            _rodata_start = .;
0136            *(.rodata*)
0137            KEEP (*(SORT(.rtemsroset.*)))
0138            *(.gnu.linkonce.r*)
0139 
0140            . = ALIGN (16);
0141            PROVIDE (etext = .);
0142 
0143    } > ram
0144 
0145   .tdata : {
0146     _TLS_Data_begin = .;
0147     *(.tdata .tdata.* .gnu.linkonce.td.*)
0148     _TLS_Data_end = .;
0149   } >ram
0150 
0151   .tbss : {
0152     _TLS_BSS_begin = .;
0153     *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0154     _TLS_BSS_end = .;
0155   } >ram
0156 
0157   _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0158   _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0159   _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0160   _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0161   _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0162   _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0163 
0164    .data BLOCK (0x4) : {
0165            copy_start = .;
0166            *(.shdata)
0167            . = ALIGN (0x10);
0168            *(.data*)
0169            KEEP (*(SORT(.rtemsrwset.*)))
0170            . = ALIGN (0x10);
0171            *(.gcc_exc)
0172            *(.gcc_except_table*)
0173            *(.jcr)
0174            . = ALIGN (0x10);
0175            *(.gnu.linkonce.d*)
0176            . = ALIGN (0x10);
0177            _edata = .;
0178            copy_end = .;
0179    } > ram
0180 
0181   .bss BLOCK (0x4) :
0182   {
0183     clear_start = . ;
0184     *(.shbss)
0185     *(.dynbss)
0186     *(.bss* .gnu.linkonce.b.*)
0187     *(COMMON)
0188     . = ALIGN(0x10);
0189     _end = .;
0190     
0191     clear_end = .;
0192   } > ram
0193 
0194   .noinit (NOLOAD) : {
0195     *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0196   } >ram
0197 
0198   .rtemsstack (NOLOAD) : {
0199     *(SORT(.rtemsstack.*))
0200     WorkAreaBase = .;
0201   } > ram
0202 
0203   .stab 0 (NOLOAD) :
0204   {
0205     *(.stab)
0206   }
0207 
0208   .stabstr 0 (NOLOAD) :
0209   {
0210     *(.stabstr)
0211   }
0212  
0213   /* Addition to let linker know about custom section for GDB pretty-printing support. */
0214   .debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
0215 }