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