Warning, /bsps/m68k/mcf5329/start/linkcmds 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 .ram_code :
0062 {
0063 *(.ram_code)
0064 } > core_sram
0065
0066 /*
0067 * Text, data and bss segments
0068 */
0069 .text 0x40000500 : {
0070
0071 *(.text*)
0072
0073 /*
0074 * C++ constructors/destructors
0075 */
0076 *(.gnu.linkonce.t.*)
0077
0078 /*
0079 * Initialization and finalization code.
0080 *
0081 * Various files can provide initialization and finalization
0082 * functions. crtbegin.o and crtend.o are two instances. The
0083 * body of these functions are in .init and .fini sections. We
0084 * accumulate the bodies here, and prepend function prologues
0085 * from crti.o and function epilogues from crtn.o. crti.o must
0086 * be linked first; crtn.o must be linked last. Because these
0087 * are wildcards, it doesn't matter if the user does not
0088 * actually link against crti.o and crtn.o; the linker won't
0089 * look for a file to match a wildcard. The wildcard also
0090 * means that it doesn't matter which directory crti.o and
0091 * crtn.o are in.
0092 */
0093 PROVIDE (_init = .);
0094 *crti.o(.init)
0095 *(.init)
0096 *crtn.o(.init)
0097 PROVIDE (_fini = .);
0098 *crti.o(.fini)
0099 *(.fini)
0100 *crtn.o(.fini)
0101
0102 /*
0103 * Special FreeBSD sysctl sections.
0104 */
0105 . = ALIGN (16);
0106 __start_set_sysctl_set = .;
0107 *(set_sysctl_*);
0108 __stop_set_sysctl_set = ABSOLUTE(.);
0109 *(set_domain_*);
0110 *(set_pseudo_*);
0111
0112 /*
0113 * C++ constructors/destructors
0114 *
0115 * gcc uses crtbegin.o to find the start of the constructors
0116 * and destructors so we make sure it is first. Because this
0117 * is a wildcard, it doesn't matter if the user does not
0118 * actually link against crtbegin.o; the linker won't look for
0119 * a file to match a wildcard. The wildcard also means that
0120 * it doesn't matter which directory crtbegin.o is in. The
0121 * constructor and destructor list are terminated in
0122 * crtend.o. The same comments apply to it.
0123 */
0124 . = ALIGN (16);
0125 *crtbegin.o(.ctors)
0126 *(.ctors)
0127 *crtend.o(.ctors)
0128 *crtbegin.o(.dtors)
0129 *(.dtors)
0130 *crtend.o(.dtors)
0131
0132 /*
0133 * Exception frame info
0134 */
0135 . = ALIGN (16);
0136 *(.eh_frame)
0137
0138 /*
0139 * Read-only data
0140 */
0141 . = ALIGN (16);
0142 _rodata_start = . ;
0143 *(.rodata*)
0144 KEEP (*(SORT(.rtemsroset.*)))
0145 *(.gnu.linkonce.r*)
0146
0147 . = ALIGN (16);
0148
0149 *(.console_gdb_xfer)
0150 *(.bootstrap_data)
0151 . = ALIGN(16);
0152 _estuff = .;
0153 PROVIDE (_etext = .);
0154 } > dram
0155
0156 .tdata : {
0157 _TLS_Data_begin = .;
0158 *(.tdata .tdata.* .gnu.linkonce.td.*)
0159 _TLS_Data_end = .;
0160 } > dram
0161
0162 .tbss : {
0163 _TLS_BSS_begin = .;
0164 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0165 _TLS_BSS_end = .;
0166 } > dram
0167
0168 _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0169 _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0170 _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0171 _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0172 _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0173 _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0174
0175 .data :
0176 {
0177 PROVIDE( _data_dest_start = . );
0178 PROVIDE( _copy_start = .);
0179 *(.data*)
0180 KEEP (*(SORT(.rtemsrwset.*)))
0181 *(.gnu.linkonce.d*)
0182 *(.gcc_except_table*)
0183 *(.jcr)
0184 . = ALIGN (16);
0185 PROVIDE (_edata = .);
0186 PROVIDE (_copy_end = .);
0187 PROVIDE (_data_dest_end = . );
0188 } > dram
0189
0190 _data_src_start = _estuff;
0191 _data_src_end = _data_dest_start + SIZEOF(.data);
0192
0193 .bss :
0194 {
0195 _clear_start = .;
0196 *(.bss*)
0197 *(COMMON)
0198 . = ALIGN (16);
0199 PROVIDE (_end = .);
0200 _clear_end = .;
0201 } > dram
0202
0203 .noinit (NOLOAD) : {
0204 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0205 WorkAreaBase = .;
0206 } > dram
0207
0208 .rtemsstack (NOLOAD) : {
0209 *(SORT(.rtemsstack.*))
0210 } > core_sram
0211
0212 /* Stabs debugging sections. */
0213 .stab 0 : { *(.stab) }
0214 .stabstr 0 : { *(.stabstr) }
0215 .stab.excl 0 : { *(.stab.excl) }
0216 .stab.exclstr 0 : { *(.stab.exclstr) }
0217 .stab.index 0 : { *(.stab.index) }
0218 .stab.indexstr 0 : { *(.stab.indexstr) }
0219 .comment 0 : { *(.comment) }
0220
0221 /* Addition to let linker know about custom section for GDB pretty-printing support. */
0222 .debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
0223
0224 PROVIDE (end_of_all = .);
0225 }