[9526d217] | 1 | /* |
---|
| 2 | * This file contains directives for the GNU linker which are specific |
---|
| 3 | * to the Generic MC68302 board. |
---|
| 4 | * |
---|
[08311cc3] | 5 | * COPYRIGHT (c) 1989-1999. |
---|
[9526d217] | 6 | * On-Line Applications Research Corporation (OAR). |
---|
| 7 | * |
---|
[98e4ebf5] | 8 | * The license and distribution terms for this file may be |
---|
| 9 | * found in the file LICENSE in this distribution or at |
---|
[d6284ab] | 10 | * http://www.rtems.com/license/LICENSE. |
---|
[9526d217] | 11 | * |
---|
| 12 | * $Id$ |
---|
| 13 | */ |
---|
| 14 | |
---|
| 15 | MEMORY |
---|
[b2b4835] | 16 | { |
---|
[9526d217] | 17 | ram : org = 0x0000, l = 16M |
---|
[b2b4835] | 18 | } |
---|
[9526d217] | 19 | |
---|
| 20 | m302 = 0xf7f000; |
---|
[11290355] | 21 | _VBR = 0x000000; /* location of the VBR table (in RAM) */ |
---|
[9526d217] | 22 | |
---|
[b2b4835] | 23 | /* |
---|
| 24 | * Declare some sizes. |
---|
| 25 | */ |
---|
[df49c60] | 26 | _RamBase = DEFINED(_RamBase) ? _RamBase : 0x0; |
---|
| 27 | _RamSize = DEFINED(_RamSize) ? _RamSize : 16M; |
---|
[b8c9883] | 28 | _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000; |
---|
| 29 | _StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; |
---|
[b2b4835] | 30 | |
---|
[9526d217] | 31 | SECTIONS |
---|
| 32 | { |
---|
[b2b4835] | 33 | ram : { |
---|
| 34 | . = 0xc00000; |
---|
| 35 | } >ram |
---|
| 36 | |
---|
| 37 | /* |
---|
| 38 | * Text, data and bss segments |
---|
| 39 | */ |
---|
| 40 | .text : { |
---|
| 41 | *(.text) |
---|
| 42 | |
---|
| 43 | /* |
---|
| 44 | * C++ constructors/destructors |
---|
| 45 | */ |
---|
| 46 | *(.gnu.linkonce.t.*) |
---|
| 47 | |
---|
| 48 | /* |
---|
| 49 | * Initialization and finalization code. |
---|
| 50 | * |
---|
| 51 | * Various files can provide initialization and finalization |
---|
| 52 | * functions. crtbegin.o and crtend.o are two instances. The |
---|
| 53 | * body of these functions are in .init and .fini sections. We |
---|
| 54 | * accumulate the bodies here, and prepend function prologues |
---|
| 55 | * from crti.o and function epilogues from crtn.o. crti.o must |
---|
| 56 | * be linked first; crtn.o must be linked last. Because these |
---|
| 57 | * are wildcards, it doesn't matter if the user does not |
---|
| 58 | * actually link against crti.o and crtn.o; the linker won't |
---|
| 59 | * look for a file to match a wildcard. The wildcard also |
---|
| 60 | * means that it doesn't matter which directory crti.o and |
---|
| 61 | * crtn.o are in. |
---|
| 62 | */ |
---|
| 63 | PROVIDE (_init = .); |
---|
| 64 | *crti.o(.init) |
---|
| 65 | *(.init) |
---|
| 66 | *crtn.o(.init) |
---|
| 67 | PROVIDE (_fini = .); |
---|
| 68 | *crti.o(.fini) |
---|
| 69 | *(.fini) |
---|
| 70 | *crtn.o(.fini) |
---|
| 71 | |
---|
[9c1133e] | 72 | /* |
---|
| 73 | * Special FreeBSD sysctl sections. |
---|
| 74 | */ |
---|
| 75 | . = ALIGN (16); |
---|
| 76 | __start_set_sysctl_set = .; |
---|
| 77 | *(set_sysctl_*); |
---|
| 78 | __stop_set_sysctl_set = ABSOLUTE(.); |
---|
| 79 | *(set_domain_*); |
---|
| 80 | *(set_pseudo_*); |
---|
| 81 | |
---|
[b2b4835] | 82 | /* |
---|
| 83 | * C++ constructors/destructors |
---|
| 84 | * |
---|
| 85 | * gcc uses crtbegin.o to find the start of the constructors |
---|
| 86 | * and destructors so we make sure it is first. Because this |
---|
| 87 | * is a wildcard, it doesn't matter if the user does not |
---|
| 88 | * actually link against crtbegin.o; the linker won't look for |
---|
| 89 | * a file to match a wildcard. The wildcard also means that |
---|
| 90 | * it doesn't matter which directory crtbegin.o is in. The |
---|
| 91 | * constructor and destructor list are terminated in |
---|
| 92 | * crtend.o. The same comments apply to it. |
---|
| 93 | */ |
---|
| 94 | . = ALIGN (16); |
---|
| 95 | *crtbegin.o(.ctors) |
---|
| 96 | *(.ctors) |
---|
| 97 | *crtend.o(.ctors) |
---|
| 98 | *crtbegin.o(.dtors) |
---|
| 99 | *(.dtors) |
---|
| 100 | *crtend.o(.dtors) |
---|
| 101 | |
---|
| 102 | /* |
---|
| 103 | * Exception frame info |
---|
| 104 | */ |
---|
| 105 | . = ALIGN (16); |
---|
| 106 | *(.eh_frame) |
---|
| 107 | |
---|
| 108 | /* |
---|
| 109 | * Read-only data |
---|
| 110 | */ |
---|
| 111 | . = ALIGN (16); |
---|
| 112 | _rodata_start = . ; |
---|
[85c92574] | 113 | *(.rodata*) |
---|
[b2b4835] | 114 | *(.gnu.linkonce.r*) |
---|
| 115 | |
---|
| 116 | . = ALIGN (16); |
---|
| 117 | PROVIDE (_etext = .); |
---|
| 118 | } >ram |
---|
| 119 | .data : { |
---|
| 120 | PROVIDE (_copy_start = .); |
---|
| 121 | *(.data) |
---|
| 122 | *(.gnu.linkonce.d*) |
---|
| 123 | *(.gcc_except_table) |
---|
[85c92574] | 124 | *(.jcr) |
---|
[b2b4835] | 125 | . = ALIGN (16); |
---|
| 126 | PROVIDE (_edata = .); |
---|
| 127 | PROVIDE (_copy_end = .); |
---|
| 128 | } >ram |
---|
| 129 | .bss : { |
---|
[b8c9883] | 130 | _clear_start = .; |
---|
[b2b4835] | 131 | *(.bss) |
---|
| 132 | *(COMMON) |
---|
| 133 | . = ALIGN (16); |
---|
| 134 | PROVIDE (end = .); |
---|
[f86ec42] | 135 | |
---|
[b8c9883] | 136 | . += _StackSize; |
---|
[b2b4835] | 137 | . = ALIGN (16); |
---|
[b8c9883] | 138 | _stack_init = .; |
---|
| 139 | _clear_end = .; |
---|
[01c36de] | 140 | |
---|
[b8c9883] | 141 | _WorkspaceBase = .; |
---|
[b2b4835] | 142 | } >ram |
---|
[9f30a08b] | 143 | |
---|
| 144 | /* Stabs debugging sections. */ |
---|
| 145 | .stab 0 : { *(.stab) } |
---|
| 146 | .stabstr 0 : { *(.stabstr) } |
---|
| 147 | .stab.excl 0 : { *(.stab.excl) } |
---|
| 148 | .stab.exclstr 0 : { *(.stab.exclstr) } |
---|
| 149 | .stab.index 0 : { *(.stab.index) } |
---|
| 150 | .stab.indexstr 0 : { *(.stab.indexstr) } |
---|
| 151 | .comment 0 : { *(.comment) } |
---|
| 152 | |
---|
| 153 | /* DWARF debug sections. |
---|
| 154 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
| 155 | of the section so we begin them at 0. */ |
---|
| 156 | /* DWARF 1 */ |
---|
| 157 | .debug 0 : { *(.debug) } |
---|
| 158 | .line 0 : { *(.line) } |
---|
| 159 | |
---|
| 160 | /* GNU DWARF 1 extensions */ |
---|
| 161 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
| 162 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
| 163 | |
---|
| 164 | /* DWARF 1.1 and DWARF 2 */ |
---|
| 165 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
| 166 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
| 167 | |
---|
| 168 | /* DWARF 2 */ |
---|
| 169 | .debug_info 0 : { *(.debug_info) } |
---|
| 170 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
| 171 | .debug_line 0 : { *(.debug_line) } |
---|
| 172 | .debug_frame 0 : { *(.debug_frame) } |
---|
| 173 | .debug_str 0 : { *(.debug_str) } |
---|
| 174 | .debug_loc 0 : { *(.debug_loc) } |
---|
| 175 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
| 176 | |
---|
| 177 | /* SGI/MIPS DWARF 2 extensions */ |
---|
| 178 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
| 179 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
| 180 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
| 181 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
| 182 | /* These must appear regardless of . */ |
---|
[9526d217] | 183 | } |
---|