Changeset b2b4835 in rtems for c/src/lib/libbsp/m68k/gen68340/startup/linkcmds
- Timestamp:
- Jan 12, 2000, 4:38:57 PM (21 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- c1d2cc9
- Parents:
- 69537ca9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/m68k/gen68340/startup/linkcmds
r69537ca9 rb2b4835 25 25 /* 26 26 * Declare some sizes. 27 * XXX: The assignment of ". += XyzSize;" fails in older gld's if the28 * number used there is not constant. If this happens to you, edit29 * the lines marked XXX below to use a constant value.30 27 */ 31 28 RamSize = DEFINED(RamSize) ? RamSize : 4M; … … 80 77 */ 81 78 .text : { 82 CREATE_OBJECT_SYMBOLS83 79 *(.text) 84 . = ALIGN (16);85 80 86 81 /* 87 * C++ constructors 82 * C++ constructors/destructors 88 83 */ 89 __CTOR_LIST__ = .; 90 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) 84 *(.gnu.linkonce.t.*) 85 86 /* 87 * Initialization and finalization code. 88 * 89 * Various files can provide initialization and finalization 90 * functions. crtbegin.o and crtend.o are two instances. The 91 * body of these functions are in .init and .fini sections. We 92 * accumulate the bodies here, and prepend function prologues 93 * from crti.o and function epilogues from crtn.o. crti.o must 94 * be linked first; crtn.o must be linked last. Because these 95 * are wildcards, it doesn't matter if the user does not 96 * actually link against crti.o and crtn.o; the linker won't 97 * look for a file to match a wildcard. The wildcard also 98 * means that it doesn't matter which directory crti.o and 99 * crtn.o are in. 100 */ 101 PROVIDE (_init = .); 102 *crti.o(.init) 103 *(.init) 104 *crtn.o(.init) 105 PROVIDE (_fini = .); 106 *crti.o(.fini) 107 *(.fini) 108 *crtn.o(.fini) 109 110 /* 111 * C++ constructors/destructors 112 * 113 * gcc uses crtbegin.o to find the start of the constructors 114 * and destructors so we make sure it is first. Because this 115 * is a wildcard, it doesn't matter if the user does not 116 * actually link against crtbegin.o; the linker won't look for 117 * a file to match a wildcard. The wildcard also means that 118 * it doesn't matter which directory crtbegin.o is in. The 119 * constructor and destructor list are terminated in 120 * crtend.o. The same comments apply to it. 121 */ 122 . = ALIGN (16); 123 *crtbegin.o(.ctors) 91 124 *(.ctors) 92 LONG(0) 93 __CTOR_END__ = .; 94 __DTOR_LIST__ = .; 95 LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) 125 *crtend.o(.ctors) 126 *crtbegin.o(.dtors) 96 127 *(.dtors) 97 LONG(0) 98 __DTOR_END__ = .; 128 *crtend.o(.dtors) 99 129 100 etext = .; 101 _etext = .; 102 } >rom 130 /* 131 * Exception frame info 132 */ 133 . = ALIGN (16); 134 *(.eh_frame) 103 135 104 .eh_fram : { 136 /* 137 * Read-only data 138 */ 105 139 . = ALIGN (16); 106 *(.eh_fram) 107 } >ram 140 _rodata_start = . ; 141 *(.rodata) 142 *(.gnu.linkonce.r*) 108 143 109 .gcc_exc : { 110 . = ALIGN (16); 111 *(.gcc_exc) 112 } >ram 144 . = ALIGN (16); 145 PROVIDE (_etext = .); 146 } >ram 147 .data : { 148 PROVIDE (_copy_start = .); 149 *(.data) 150 *(.gnu.linkonce.d*) 151 *(.gcc_except_table) 152 . = ALIGN (16); 153 PROVIDE (_edata = .); 154 PROVIDE (_copy_end = .); 155 } >ram 156 .bss : { 157 M68Kvec = .; 158 _M68Kvec = .; 159 . += (256 * 4); 160 PROVIDE (_bss_start = .); 161 PROVIDE (_clear_start = .); 162 *(.bss) 163 *(COMMON) 164 . = ALIGN (16); 165 PROVIDE (end = .); 166 167 . += StackSize; 168 PROVIDE (_stack_init = .); 169 170 . = ALIGN (16); 171 PROVIDE (_HeapStart = .); 172 . += HeapSize; 173 PROVIDE (_HeapEnd = .); 174 175 clear_end = .; 176 177 PROVIDE (_WorkspaceBase = .); 178 } >ram 113 179 114 180 /* … … 122 188 } >ram 123 189 124 .data : {125 copy_start = .;126 *(.data)127 . = ALIGN (16);128 _edata = .;129 copy_end = .;130 } >ram131 132 .bss : {133 M68Kvec = .;134 _M68Kvec = .;135 . += (256 * 4);136 clear_start = .;137 *(.bss)138 *(COMMON)139 . = ALIGN (16);140 _end = .;141 142 _HeapStart = .;143 __HeapStart = .;144 . += HeapSize; /* XXX -- Old gld can't handle this */145 . += StackSize; /* XXX -- Old gld can't handle this */146 /* . += 0x10000; */ /* HeapSize for old gld */147 /* . += 0x1000; */ /* StackSize for old gld */148 . = ALIGN (16);149 stack_init = .;150 clear_end = .;151 152 _WorkspaceBase = .;153 __WorkspaceBase = .;154 } >ram155 190 }
Note: See TracChangeset
for help on using the changeset viewer.