Warning, /bsps/m68k/av5282/start/linkcmdsram 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 Arcturus uC DIMM ColdFire 5282
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.
0030 */
0031
0032 /*
0033 * Declare some sizes.
0034 */
0035 RamBase = DEFINED(RamBase) ? RamBase : 0x0;
0036 RamSize = DEFINED(RamSize) ? RamSize : 16M;
0037 RamEnd = RamBase + RamSize;
0038 HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
0039 _VBR = 0x0;
0040
0041 /*
0042 * System clock speed
0043 */
0044 _CPUClockSpeed = DEFINED(_CPUClockSpeed) ? _CPUClockSpeed : 58976000 ;
0045
0046 /*
0047 * Location of on-chip devicesa
0048 */
0049 __IPSBAR = DEFINED(__IPSBAR) ? __IPSBAR : 0x40000000 ;
0050 __SRAMBASE = DEFINED(__SRAMBASE) ? __SRAMBASE : 0x20000000 ;
0051
0052 ENTRY(start)
0053 STARTUP(start.o)
0054
0055 MEMORY
0056 {
0057 ram : ORIGIN = 0, LENGTH = 16M
0058 sram : ORIGIN = 0x20000000, LENGTH = 64K
0059 flash : ORIGIN = 0xFF800000, LENGTH = 8M
0060 }
0061
0062 SECTIONS
0063 {
0064
0065 _header_offset = 0;
0066
0067 /*
0068 * Text, data and bss segments
0069 */
0070 .text 0x40000 : {
0071
0072 *(.text*)
0073 *(.ram_code)
0074
0075 /*
0076 * C++ constructors/destructors
0077 */
0078 *(.gnu.linkonce.t.*)
0079
0080 /*
0081 * Initialization and finalization code.
0082 *
0083 * Various files can provide initialization and finalization
0084 * functions. crtbegin.o and crtend.o are two instances. The
0085 * body of these functions are in .init and .fini sections. We
0086 * accumulate the bodies here, and prepend function prologues
0087 * from crti.o and function epilogues from crtn.o. crti.o must
0088 * be linked first; crtn.o must be linked last. Because these
0089 * are wildcards, it doesn't matter if the user does not
0090 * actually link against crti.o and crtn.o; the linker won't
0091 * look for a file to match a wildcard. The wildcard also
0092 * means that it doesn't matter which directory crti.o and
0093 * crtn.o are in.
0094 */
0095 PROVIDE (_init = .);
0096 *crti.o(.init)
0097 *(.init)
0098 *crtn.o(.init)
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 /*
0116 * C++ constructors/destructors
0117 *
0118 * gcc uses crtbegin.o to find the start of the constructors
0119 * and destructors so we make sure it is first. Because this
0120 * is a wildcard, it doesn't matter if the user does not
0121 * actually link against crtbegin.o; the linker won't look for
0122 * a file to match a wildcard. The wildcard also means that
0123 * it doesn't matter which directory crtbegin.o is in. The
0124 * constructor and destructor list are terminated in
0125 * crtend.o. The same comments apply to it.
0126 */
0127 . = ALIGN (16);
0128 *crtbegin.o(.ctors)
0129 *(.ctors)
0130 *crtend.o(.ctors)
0131 *crtbegin.o(.dtors)
0132 *(.dtors)
0133 *crtend.o(.dtors)
0134
0135 /*
0136 * Exception frame info
0137 */
0138 . = ALIGN (16);
0139 *(.eh_frame)
0140
0141 /*
0142 * Read-only data
0143 */
0144 . = ALIGN (16);
0145 _rodata_start = . ;
0146 *(.rodata*)
0147 KEEP (*(SORT(.rtemsroset.*)))
0148 *(.gnu.linkonce.r*)
0149
0150 . = ALIGN (16);
0151
0152 *(.console_gdb_xfer)
0153 *(.bootstrap_data)
0154 . = ALIGN(16);
0155 _estuff = .;
0156 PROVIDE (_etext = .);
0157 } >ram
0158
0159 .tdata : {
0160 _TLS_Data_begin = .;
0161 *(.tdata .tdata.* .gnu.linkonce.td.*)
0162 _TLS_Data_end = .;
0163 } >ram
0164
0165 .tbss : {
0166 _TLS_BSS_begin = .;
0167 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0168 _TLS_BSS_end = .;
0169 } >ram
0170
0171 _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0172 _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0173 _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0174 _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0175 _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0176 _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0177
0178 .data : {
0179 PROVIDE( _data_dest_start = . );
0180 PROVIDE( _copy_start = .);
0181 *(.data)
0182 KEEP (*(SORT(.rtemsrwset.*)))
0183 *(.gnu.linkonce.d*)
0184 *(.gcc_except_table*)
0185 *(.jcr)
0186 . = ALIGN (16);
0187 PROVIDE (_edata = .);
0188 PROVIDE (_copy_end = .);
0189 PROVIDE (_data_dest_end = . );
0190 } >ram
0191
0192 _data_src_start = _estuff;
0193 _data_src_end = _data_dest_start + SIZEOF(.data);
0194
0195 .bss : {
0196 _clear_start = .;
0197 *(.bss*)
0198 *(COMMON)
0199 . = ALIGN (16);
0200 PROVIDE (end = .);
0201 _clear_end = .;
0202 } >ram
0203
0204 .noinit (NOLOAD) : {
0205 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0206 } >ram
0207
0208 .rtemsstack (NOLOAD) : {
0209 *(SORT(.rtemsstack.*))
0210 WorkAreaBase = .;
0211 } >ram
0212
0213 /* Stabs debugging sections. */
0214 .stab 0 : { *(.stab) }
0215 .stabstr 0 : { *(.stabstr) }
0216 .stab.excl 0 : { *(.stab.excl) }
0217 .stab.exclstr 0 : { *(.stab.exclstr) }
0218 .stab.index 0 : { *(.stab.index) }
0219 .stab.indexstr 0 : { *(.stab.indexstr) }
0220 .comment 0 : { *(.comment) }
0221
0222 PROVIDE (end_of_all = .);
0223 }