Warning, /bsps/m68k/mcf5329/start/linkcmdsflash is written in an unsupported language. File is not indexed.
0001 /* SPDX-License-Identifier: BSD-2-Clause */
0002
0003 /*
0004 * This file contains directives for the GNU linker which are specific
0005 * to the Freescale ColdFire mcf52235
0006 *
0007 * COPYRIGHT (c) 1989-1999.
0008 * On-Line Applications Research Corporation (OAR).
0009 *
0010 * Redistribution and use in source and binary forms, with or without
0011 * modification, are permitted provided that the following conditions
0012 * are met:
0013 * 1. Redistributions of source code must retain the above copyright
0014 * notice, this list of conditions and the following disclaimer.
0015 * 2. Redistributions in binary form must reproduce the above copyright
0016 * notice, this list of conditions and the following disclaimer in the
0017 * documentation and/or other materials provided with the distribution.
0018 *
0019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0020 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0021 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0022 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0023 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0024 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0025 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0026 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0027 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0028 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0029 * POSSIBILITY OF SUCH DAMAGE.e
0030 */
0031
0032 /*
0033 * Declare some sizes.
0034 */
0035 _CoreSRamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
0036 _CoreSRamSize = DEFINED(RamSize) ? RamSize : 32K;
0037
0038 RamBase = DEFINED(RamBase) ? RamBase : 0x40000000;
0039 RamSize = DEFINED(RamSize) ? RamSize : 32M;
0040 RamEnd = RamBase + RamSize;
0041
0042 _BootFlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000;
0043 _BootFlashSize = DEFINED(_FlashBase) ? _FlashBase : 2M;
0044
0045 HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
0046
0047 _VBR = 0x40000000;
0048
0049 ENTRY(start)
0050 STARTUP(start.o)
0051
0052 MEMORY
0053 {
0054 core_sram : ORIGIN = 0x80000000, LENGTH = 32K
0055 boot_flash : ORIGIN = 0x00000000, LENGTH = 2M
0056 dram : ORIGIN = 0x40000000, LENGTH = 32M
0057 }
0058
0059 SECTIONS
0060 {
0061 /*
0062 * Text, data and bss segments
0063 */
0064 .text : {
0065
0066 *(.text*)
0067 *(.ram_code)
0068
0069 /*
0070 * C++ constructors/destructors
0071 */
0072 *(.gnu.linkonce.t.*)
0073
0074 /*
0075 * Initialization and finalization code.
0076 *
0077 * Various files can provide initialization and finalization
0078 * functions. crtbegin.o and crtend.o are two instances. The
0079 * body of these functions are in .init and .fini sections. We
0080 * accumulate the bodies here, and prepend function prologues
0081 * from crti.o and function epilogues from crtn.o. crti.o must
0082 * be linked first; crtn.o must be linked last. Because these
0083 * are wildcards, it doesn't matter if the user does not
0084 * actually link against crti.o and crtn.o; the linker won't
0085 * look for a file to match a wildcard. The wildcard also
0086 * means that it doesn't matter which directory crti.o and
0087 * crtn.o are in.
0088 */
0089 PROVIDE (_init = .);
0090 *crti.o(.init)
0091 *(.init)
0092 *crtn.o(.init)
0093 PROVIDE (_fini = .);
0094 *crti.o(.fini)
0095 *(.fini)
0096 *crtn.o(.fini)
0097
0098 /*
0099 * Special FreeBSD sysctl sections.
0100 */
0101 . = ALIGN (16);
0102 __start_set_sysctl_set = .;
0103 *(set_sysctl_*);
0104 __stop_set_sysctl_set = ABSOLUTE(.);
0105 *(set_domain_*);
0106 *(set_pseudo_*);
0107
0108 /*
0109 * C++ constructors/destructors
0110 *
0111 * gcc uses crtbegin.o to find the start of the constructors
0112 * and destructors so we make sure it is first. Because this
0113 * is a wildcard, it doesn't matter if the user does not
0114 * actually link against crtbegin.o; the linker won't look for
0115 * a file to match a wildcard. The wildcard also means that
0116 * it doesn't matter which directory crtbegin.o is in. The
0117 * constructor and destructor list are terminated in
0118 * crtend.o. The same comments apply to it.
0119 */
0120 . = ALIGN (16);
0121 *crtbegin.o(.ctors)
0122 *(.ctors)
0123 *crtend.o(.ctors)
0124 *crtbegin.o(.dtors)
0125 *(.dtors)
0126 *crtend.o(.dtors)
0127
0128 /*
0129 * Exception frame info
0130 */
0131 . = ALIGN (16);
0132 *(.eh_frame)
0133
0134 /*
0135 * Read-only data
0136 */
0137 . = ALIGN (16);
0138 _rodata_start = . ;
0139 *(.rodata*)
0140 KEEP (*(SORT(.rtemsroset.*)))
0141 *(.gnu.linkonce.r*)
0142
0143 . = ALIGN (16);
0144
0145 *(.console_gdb_xfer)
0146 *(.bootstrap_data)
0147 } > boot_flash
0148
0149 .tdata : {
0150 _TLS_Data_begin = .;
0151 *(.tdata .tdata.* .gnu.linkonce.td.*)
0152 _TLS_Data_end = .;
0153 . = ALIGN(16);
0154 _estuff = .;
0155 PROVIDE (_etext = .);
0156 } > boot_flash
0157
0158 .tbss : {
0159 _TLS_BSS_begin = .;
0160 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0161 _TLS_BSS_end = .;
0162 } > boot_flash
0163
0164 _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0165 _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0166 _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0167 _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0168 _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0169 _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0170
0171 .data 0x40000500 : AT (_estuff)
0172 {
0173 PROVIDE( _data_dest_start = . );
0174 PROVIDE( _copy_start = .);
0175 *(.data*)
0176 KEEP (*(SORT(.rtemsrwset.*)))
0177 *(.gnu.linkonce.d*)
0178 *(.gcc_except_table*)
0179 *(.jcr)
0180 . = ALIGN (16);
0181 PROVIDE (_edata = .);
0182 PROVIDE (_copy_end = .);
0183 PROVIDE (_data_dest_end = . );
0184 } > dram
0185
0186 _data_src_start = _estuff;
0187 _data_src_end = _data_dest_start + SIZEOF(.data);
0188
0189 .bss :
0190 {
0191 _clear_start = .;
0192 *(.bss*)
0193 *(COMMON)
0194 . = ALIGN (16);
0195 PROVIDE (_end = .);
0196 _clear_end = .;
0197 } > dram
0198
0199 .noinit (NOLOAD) : {
0200 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0201 WorkAreaBase = .;
0202 } > dram
0203
0204 .rtemsstack (NOLOAD) : {
0205 *(SORT(.rtemsstack.*))
0206 } > core_sram
0207
0208 /* Stabs debugging sections. */
0209 .stab 0 : { *(.stab) }
0210 .stabstr 0 : { *(.stabstr) }
0211 .stab.excl 0 : { *(.stab.excl) }
0212 .stab.exclstr 0 : { *(.stab.exclstr) }
0213 .stab.index 0 : { *(.stab.index) }
0214 .stab.indexstr 0 : { *(.stab.indexstr) }
0215 .comment 0 : { *(.comment) }
0216
0217 PROVIDE (end_of_all = .);
0218 }