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