[ac7d5ef0] | 1 | /* |
---|
| 2 | * This file contains directives for the GNU linker which are specific |
---|
| 3 | * to the DY-4 DMV152/SVME153 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 | */ |
---|
[b8c9883] | 18 | _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000; |
---|
| 19 | _StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; |
---|
[db88957] | 20 | |
---|
[ac7d5ef0] | 21 | MEMORY |
---|
[b2b4835] | 22 | { |
---|
| 23 | ram : org = 0x0, l = 1M |
---|
| 24 | } |
---|
[ac7d5ef0] | 25 | |
---|
[b8c9883] | 26 | _RamBase = 0; |
---|
| 27 | _RamSize = 1M; |
---|
| 28 | |
---|
[ac7d5ef0] | 29 | SECTIONS |
---|
| 30 | { |
---|
[b2b4835] | 31 | ram : { |
---|
| 32 | . = 0x12800; |
---|
| 33 | } >ram |
---|
[f86ec42] | 34 | |
---|
[b2b4835] | 35 | /* |
---|
| 36 | * Text, data and bss segments |
---|
| 37 | */ |
---|
| 38 | .text : { |
---|
| 39 | *(.text) |
---|
[f86ec42] | 40 | |
---|
[b2b4835] | 41 | /* |
---|
| 42 | * C++ constructors/destructors |
---|
| 43 | */ |
---|
| 44 | *(.gnu.linkonce.t.*) |
---|
| 45 | |
---|
| 46 | /* |
---|
| 47 | * Initialization and finalization code. |
---|
| 48 | * |
---|
| 49 | * Various files can provide initialization and finalization |
---|
| 50 | * functions. crtbegin.o and crtend.o are two instances. The |
---|
| 51 | * body of these functions are in .init and .fini sections. We |
---|
| 52 | * accumulate the bodies here, and prepend function prologues |
---|
| 53 | * from crti.o and function epilogues from crtn.o. crti.o must |
---|
| 54 | * be linked first; crtn.o must be linked last. Because these |
---|
| 55 | * are wildcards, it doesn't matter if the user does not |
---|
| 56 | * actually link against crti.o and crtn.o; the linker won't |
---|
| 57 | * look for a file to match a wildcard. The wildcard also |
---|
| 58 | * means that it doesn't matter which directory crti.o and |
---|
| 59 | * crtn.o are in. |
---|
| 60 | */ |
---|
| 61 | PROVIDE (_init = .); |
---|
| 62 | *crti.o(.init) |
---|
| 63 | *(.init) |
---|
| 64 | *crtn.o(.init) |
---|
| 65 | PROVIDE (_fini = .); |
---|
| 66 | *crti.o(.fini) |
---|
| 67 | *(.fini) |
---|
| 68 | *crtn.o(.fini) |
---|
| 69 | |
---|
| 70 | /* |
---|
| 71 | * C++ constructors/destructors |
---|
| 72 | * |
---|
| 73 | * gcc uses crtbegin.o to find the start of the constructors |
---|
| 74 | * and destructors so we make sure it is first. Because this |
---|
| 75 | * is a wildcard, it doesn't matter if the user does not |
---|
| 76 | * actually link against crtbegin.o; the linker won't look for |
---|
| 77 | * a file to match a wildcard. The wildcard also means that |
---|
| 78 | * it doesn't matter which directory crtbegin.o is in. The |
---|
| 79 | * constructor and destructor list are terminated in |
---|
| 80 | * crtend.o. The same comments apply to it. |
---|
| 81 | */ |
---|
| 82 | . = ALIGN (16); |
---|
| 83 | *crtbegin.o(.ctors) |
---|
| 84 | *(.ctors) |
---|
| 85 | *crtend.o(.ctors) |
---|
| 86 | *crtbegin.o(.dtors) |
---|
| 87 | *(.dtors) |
---|
| 88 | *crtend.o(.dtors) |
---|
[7c9cca11] | 89 | |
---|
[b2b4835] | 90 | /* |
---|
| 91 | * Exception frame info |
---|
| 92 | */ |
---|
| 93 | . = ALIGN (16); |
---|
| 94 | *(.eh_frame) |
---|
[2a4791f] | 95 | |
---|
[b2b4835] | 96 | /* |
---|
| 97 | * Read-only data |
---|
| 98 | */ |
---|
| 99 | . = ALIGN (16); |
---|
| 100 | _rodata_start = . ; |
---|
| 101 | *(.rodata) |
---|
| 102 | *(.gnu.linkonce.r*) |
---|
[2a4791f] | 103 | |
---|
[b2b4835] | 104 | . = ALIGN (16); |
---|
| 105 | PROVIDE (etext = .); |
---|
| 106 | } >ram |
---|
[7c9cca11] | 107 | .data : { |
---|
[b2b4835] | 108 | copy_start = .; |
---|
| 109 | *(.data) |
---|
| 110 | *(.gnu.linkonce.d*) |
---|
| 111 | *(.gcc_except_table) |
---|
| 112 | . = ALIGN (16); |
---|
| 113 | PROVIDE (_edata = .); |
---|
| 114 | copy_end = .; |
---|
| 115 | } >ram |
---|
[7c9cca11] | 116 | .bss : { |
---|
[9b2c969] | 117 | _clear_start = .; |
---|
[b2b4835] | 118 | *(.bss) |
---|
| 119 | *(COMMON) |
---|
| 120 | . = ALIGN (16); |
---|
| 121 | PROVIDE (end = .); |
---|
| 122 | |
---|
[b8c9883] | 123 | . += _StackSize; |
---|
[b2b4835] | 124 | . = ALIGN (16); |
---|
[b8c9883] | 125 | _stack_init = .; |
---|
| 126 | _clear_end = .; |
---|
[b2b4835] | 127 | |
---|
| 128 | _WorkspaceBase = .; |
---|
| 129 | } >ram |
---|
[ac7d5ef0] | 130 | } |
---|