Changeset 5d81ce9 in rtems
- Timestamp:
- 11/18/02 00:52:17 (21 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 9eadce0
- Parents:
- 69efcbc1
- Location:
- c/src/lib/libbsp/powerpc/motorola_powerpc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/powerpc/motorola_powerpc/ChangeLog
r69efcbc1 r5d81ce9 1 2002-11-14 Greg Menke <gregory.menke@gsfc.nasa.gov> 2 3 * bsp_specs: Added crtbegin,crtend objects so C++ global objects 4 constructors/destructors run correctly. 5 * startup/linkcmds: Increased code length and updated the ctor/dtor 6 sections to handle crtbegin, crtend objects. 7 > 1 8 2002-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 9 -
c/src/lib/libbsp/powerpc/motorola_powerpc/bsp_specs
r69efcbc1 r5d81ce9 11 11 %{!qrtems: %(old_lib)} %{!nostdlib: %{qrtems: --start-group \ 12 12 %{!qrtems_debug: -lrtemsbsp -lrtemscpu} %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \ 13 -lc -lgcc --end-group ecrtn%O%s\13 -lc -lgcc --end-group \ 14 14 %{!qnolinkcmds: -T linkcmds%s}}} 15 15 16 16 *startfile: 17 %{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s \17 %{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s crtbegin.o%s \ 18 18 %{!qrtems_debug: start.o%s} \ 19 19 %{qrtems_debug: start_g.o%s}}} … … 22 22 %{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e __rtems_entry_point -u __vectors} 23 23 24 *endfile: 25 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s} -
c/src/lib/libbsp/powerpc/motorola_powerpc/startup/linkcmds
r69efcbc1 r5d81ce9 8 8 MEMORY { 9 9 VECTORS : ORIGIN = 0x0 , LENGTH = 0x3000 10 CODE : ORIGIN = 0x3000 , LENGTH = 0x 10000010 CODE : ORIGIN = 0x3000 , LENGTH = 0x200000 11 11 } 12 12 SECTIONS … … 60 60 *(.gnu.linkonce.t*) 61 61 } > CODE 62 .init : { _init = .; *(.init) } >CODE63 .fini : { _fini = .; *(.fini) } >CODE62 .init : { _init = .; KEEP(*(.init)) } >CODE 63 .fini : { _fini = .; KEEP(*(.fini)) } >CODE 64 64 .rodata : { *(.rodata*) *(.gnu.linkonce.r*) } > CODE 65 65 .rodata1 : { *(.rodata1) } > CODE … … 67 67 _etext = .; 68 68 PROVIDE (etext = .); 69 70 /* Adjust the address for the data segment. We want to adjust up to 71 the same address within the page on the next page up. */ 72 . = ALIGN(0x10000) + (. & (0x10000 - 1)); 73 /* Ensure the __preinit_array_start label is properly aligned. We 74 could instead move the label definition inside the section, but 75 the linker would then create the section even if it turns out to 76 be empty, which isn't pretty. */ 77 . = ALIGN(32 / 8); 78 PROVIDE (__preinit_array_start = .); 79 .preinit_array : { *(.preinit_array) } >CODE 80 PROVIDE (__preinit_array_end = .); 81 PROVIDE (__init_array_start = .); 82 .init_array : { *(.init_array) } >CODE 83 PROVIDE (__init_array_end = .); 84 PROVIDE (__fini_array_start = .); 85 .fini_array : { *(.fini_array) } >CODE 86 PROVIDE (__fini_array_end = .); 87 69 88 .sdata2 : { *(.sdata2) *(.gnu.linkonce.s2.*) } >CODE 70 89 .sbss2 : { *(.sbss2) *(.gnu.linkonce.sb2.*) } >CODE … … 88 107 *(.data) 89 108 *(.gnu.linkonce.d*) 90 CONSTRUCTORS109 SORT(CONSTRUCTORS) 91 110 } > CODE 92 111 .data1 : { *(.data1) } > CODE … … 101 120 PROVIDE (_GOT2_START_ = .); 102 121 .got2 : { *(.got2) } > CODE 122 123 124 /* removed 11/14, gregm 103 125 PROVIDE (__CTOR_LIST__ = .); 104 126 .ctors : { *(.ctors) } > CODE … … 107 129 .dtors : { *(.dtors) } > CODE 108 130 PROVIDE (__DTOR_END__ = .); 131 */ 132 133 134 .ctors : 135 { 136 /* gcc uses crtbegin.o to find the start of 137 the constructors, so we make sure it is 138 first. Because this is a wildcard, it 139 doesn't matter if the user does not 140 actually link against crtbegin.o; the 141 linker won't look for a file to match a 142 wildcard. The wildcard also means that it 143 doesn't matter which directory crtbegin.o 144 is in. */ 145 KEEP (*crtbegin.o(.ctors)) 146 /* We don't want to include the .ctor section from 147 from the crtend.o file until after the sorted ctors. 148 The .ctor section from the crtend file contains the 149 end of ctors marker and it must be last */ 150 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) 151 KEEP (*(SORT(.ctors.*))) 152 KEEP (*(.ctors)) 153 } > CODE 154 .dtors : 155 { 156 KEEP (*crtbegin.o(.dtors)) 157 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) 158 KEEP (*(SORT(.dtors.*))) 159 KEEP (*(.dtors)) 160 } > CODE 161 162 109 163 PROVIDE (_FIXUP_START_ = .); 110 164 .fixup : { *(.fixup) } > CODE … … 112 166 PROVIDE (_GOT2_END_ = .); 113 167 PROVIDE (_GOT_START_ = .); 168 114 169 .got : { *(.got) } > CODE 115 170 .got.plt : { *(.got.plt) } > CODE 171 116 172 PROVIDE (_GOT_END_ = .); 173 174 .jcr : { KEEP (*(.jcr)) } > CODE 175 117 176 /* We want the small data sections together, so single-instruction offsets 118 177 can access them all, and initialized data all before uninitialized, so
Note: See TracChangeset
for help on using the changeset viewer.