Warning, /bsps/m68k/mrm332/start/linkcmds is written in an unsupported language. File is not indexed.
0001 /* linkcmds
0002 */
0003
0004 OUTPUT_ARCH(m68k)
0005 ENTRY(start)
0006 STARTUP(start.o)
0007 __DYNAMIC = 0;
0008
0009 /*
0010 * ROM:
0011 * +--------------------+ <- low memory
0012 * | .text |
0013 * | etext |
0014 * | ctor list | the ctor and dtor lists are for
0015 * | dtor list | C++ support
0016 * | _endtext |
0017 * | temporary .data | .data is moved to RAM by crt0
0018 * | |
0019 * +--------------------+ <- high memory
0020 *
0021 *
0022 * RAM:
0023 * +--------------------+ <- low memory
0024 * | .data | initialized data goes here
0025 * | _sdata |
0026 * | _edata |
0027 * +--------------------+
0028 * | .bss |
0029 * | __bss_start | start of bss, cleared by crt0
0030 * | _end | start of heap, used by sbrk()
0031 * +--------------------+
0032 * | heap space |
0033 * | _ENDHEAP |
0034 * | stack space |
0035 * +--------------------+ <- high memory
0036 */
0037
0038 /*
0039 * Declare some sizes.
0040 */
0041 RomBase = DEFINED(RomBase) ? RomBase : 0x90000;
0042 RamBase = DEFINED(RamBase) ? RamBase : 0x03000;
0043 RamSize = DEFINED(RamSize) ? RamSize : 0x7d000;
0044 RamEnd = RamBase + RamSize;
0045
0046 MEMORY
0047 {
0048 rom : ORIGIN = 0x90000, LENGTH = 0x70000
0049 ram : ORIGIN = 0x03000, LENGTH = 0x7d000
0050 }
0051
0052 _copy_data_from_rom = 1;
0053 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
0054
0055
0056 /*
0057 *
0058 */
0059 SECTIONS
0060 {
0061 .text :
0062 {
0063 . = .;
0064 text_start = .;
0065 _text_start = .;
0066 *(.text*)
0067 . = ALIGN (16);
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 } > rom
0143 .tdata : {
0144 _TLS_Data_begin = .;
0145 *(.tdata .tdata.* .gnu.linkonce.td.*)
0146 _TLS_Data_end = .;
0147 } > rom
0148 .tbss : {
0149 _TLS_BSS_begin = .;
0150 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0151 _TLS_BSS_end = .;
0152
0153 . = ALIGN (16);
0154 PROVIDE (_etext = .);
0155 _endtext = .;
0156 __data_start_rom = .;
0157 } > rom
0158 _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0159 _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0160 _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0161 _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0162 _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0163 _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0164 .data : AT(__data_start_rom)
0165 {
0166 PROVIDE (_copy_start = .);
0167 *(.data*)
0168 KEEP (*(SORT(.rtemsrwset.*)))
0169 *(.gnu.linkonce.d*)
0170 *(.gcc_exc)
0171 *(.gcc_except_table*)
0172 *(.jcr)
0173 . = ALIGN (16);
0174 PROVIDE (_edata = .);
0175 PROVIDE (_copy_end = .);
0176 } > ram
0177 .shbss :
0178 {
0179 *(.shbss)
0180 } > ram
0181 .bss :
0182 {
0183 M68Kvec = .;
0184 . += (256 * 4);
0185 _clear_start = .;
0186 *(.dynbss)
0187 *(.bss* .gnu.linkonce.b.*)
0188 *(COMMON)
0189 . = ALIGN (16);
0190 PROVIDE (end = .);
0191 _clear_end = .;
0192 } > ram
0193 .noinit (NOLOAD) : {
0194 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0195 } > ram
0196 .rtemsstack (NOLOAD) : {
0197 *(SORT(.rtemsstack.*))
0198 WorkAreaBase = .;
0199 } > ram
0200 .stab . (NOLOAD) :
0201 {
0202 [ .stab ]
0203 }
0204 .stabstr . (NOLOAD) :
0205 {
0206 [ .stabstr ]
0207 }
0208
0209 /* Addition to let linker know about custom section for GDB pretty-printing support. */
0210 .debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
0211 }