[28fa54d9] | 1 | /* |
---|
| 2 | * This file contains directives for the GNU linker which are specific |
---|
| 3 | * to the Motorola MVME147 boards. |
---|
| 4 | * |
---|
[08311cc3] | 5 | * COPYRIGHT (c) 1989-1999. |
---|
[28fa54d9] | 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. |
---|
[28fa54d9] | 11 | * |
---|
| 12 | * MVME147 port for TNI - Telecom Bretagne |
---|
| 13 | * by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr) |
---|
| 14 | * May 1996 |
---|
| 15 | * |
---|
| 16 | * $Id$ |
---|
| 17 | */ |
---|
| 18 | |
---|
[b2b4835] | 19 | /* |
---|
| 20 | * Declare some sizes. |
---|
| 21 | */ |
---|
| 22 | HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000; |
---|
[db88957] | 23 | StackSize = DEFINED(StackSize) ? StackSize : 0x1000; |
---|
| 24 | |
---|
[28fa54d9] | 25 | MEMORY |
---|
[b2b4835] | 26 | { |
---|
| 27 | ram : org = 0x0, l = 0x400000 |
---|
| 28 | } |
---|
[28fa54d9] | 29 | |
---|
| 30 | SECTIONS |
---|
| 31 | { |
---|
[b2b4835] | 32 | ram : { |
---|
| 33 | . = 0x5000; |
---|
| 34 | } >ram |
---|
| 35 | |
---|
| 36 | /* |
---|
| 37 | * Text, data and bss segments |
---|
| 38 | */ |
---|
| 39 | .text : { |
---|
| 40 | *(.text) |
---|
| 41 | |
---|
| 42 | /* |
---|
| 43 | * C++ constructors/destructors |
---|
| 44 | */ |
---|
| 45 | *(.gnu.linkonce.t.*) |
---|
| 46 | |
---|
| 47 | /* |
---|
| 48 | * Initialization and finalization code. |
---|
| 49 | * |
---|
| 50 | * Various files can provide initialization and finalization |
---|
| 51 | * functions. crtbegin.o and crtend.o are two instances. The |
---|
| 52 | * body of these functions are in .init and .fini sections. We |
---|
| 53 | * accumulate the bodies here, and prepend function prologues |
---|
| 54 | * from crti.o and function epilogues from crtn.o. crti.o must |
---|
| 55 | * be linked first; crtn.o must be linked last. Because these |
---|
| 56 | * are wildcards, it doesn't matter if the user does not |
---|
| 57 | * actually link against crti.o and crtn.o; the linker won't |
---|
| 58 | * look for a file to match a wildcard. The wildcard also |
---|
| 59 | * means that it doesn't matter which directory crti.o and |
---|
| 60 | * crtn.o are in. |
---|
| 61 | */ |
---|
| 62 | PROVIDE (_init = .); |
---|
| 63 | *crti.o(.init) |
---|
| 64 | *(.init) |
---|
| 65 | *crtn.o(.init) |
---|
| 66 | PROVIDE (_fini = .); |
---|
| 67 | *crti.o(.fini) |
---|
| 68 | *(.fini) |
---|
| 69 | *crtn.o(.fini) |
---|
[f86ec42] | 70 | |
---|
[b2b4835] | 71 | /* |
---|
| 72 | * C++ constructors/destructors |
---|
| 73 | * |
---|
| 74 | * gcc uses crtbegin.o to find the start of the constructors |
---|
| 75 | * and destructors so we make sure it is first. Because this |
---|
| 76 | * is a wildcard, it doesn't matter if the user does not |
---|
| 77 | * actually link against crtbegin.o; the linker won't look for |
---|
| 78 | * a file to match a wildcard. The wildcard also means that |
---|
| 79 | * it doesn't matter which directory crtbegin.o is in. The |
---|
| 80 | * constructor and destructor list are terminated in |
---|
| 81 | * crtend.o. The same comments apply to it. |
---|
| 82 | */ |
---|
| 83 | . = ALIGN (16); |
---|
| 84 | *crtbegin.o(.ctors) |
---|
| 85 | *(.ctors) |
---|
| 86 | *crtend.o(.ctors) |
---|
| 87 | *crtbegin.o(.dtors) |
---|
| 88 | *(.dtors) |
---|
| 89 | *crtend.o(.dtors) |
---|
[f86ec42] | 90 | |
---|
[b2b4835] | 91 | /* |
---|
| 92 | * Exception frame info |
---|
| 93 | */ |
---|
| 94 | . = ALIGN (16); |
---|
| 95 | *(.eh_frame) |
---|
| 96 | |
---|
| 97 | /* |
---|
| 98 | * Read-only data |
---|
| 99 | */ |
---|
| 100 | . = ALIGN (16); |
---|
| 101 | _rodata_start = . ; |
---|
| 102 | *(.rodata) |
---|
| 103 | *(.gnu.linkonce.r*) |
---|
| 104 | |
---|
| 105 | . = ALIGN (16); |
---|
| 106 | PROVIDE (_etext = .); |
---|
| 107 | } >ram |
---|
[01c36de] | 108 | .data : { |
---|
[b2b4835] | 109 | PROVIDE (_copy_start = .); |
---|
| 110 | *(.data) |
---|
| 111 | *(.gnu.linkonce.d*) |
---|
| 112 | *(.gcc_except_table) |
---|
| 113 | . = ALIGN (16); |
---|
| 114 | PROVIDE (_edata = .); |
---|
| 115 | PROVIDE (_copy_end = .); |
---|
| 116 | } >ram |
---|
[01c36de] | 117 | .bss : { |
---|
[b2b4835] | 118 | PROVIDE (_bss_start = .); |
---|
| 119 | PROVIDE (_clear_start = .); |
---|
| 120 | *(.bss) |
---|
| 121 | *(COMMON) |
---|
| 122 | . = ALIGN (16); |
---|
| 123 | PROVIDE (end = .); |
---|
| 124 | |
---|
| 125 | . += StackSize; |
---|
| 126 | PROVIDE (_stack_init = .); |
---|
| 127 | |
---|
| 128 | . = ALIGN (16); |
---|
| 129 | PROVIDE (_HeapStart = .); |
---|
| 130 | . += HeapSize; |
---|
| 131 | PROVIDE (_HeapEnd = .); |
---|
| 132 | |
---|
| 133 | clear_end = .; |
---|
| 134 | |
---|
| 135 | PROVIDE (_WorkspaceBase = .); |
---|
| 136 | } >ram |
---|
[28fa54d9] | 137 | } |
---|