1OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", 2 "elf32-powerpc") 3OUTPUT_ARCH(powerpc) 4ENTRY(_start) 5/* Do we need any of these for elf? 6 __DYNAMIC = 0; */ 7PROVIDE (__stack = 0); PROVIDE (___stack = 0); 8SECTIONS 9{ 10 /* Read-only sections, merged into text segment: */ 11 . = 0 + SIZEOF_HEADERS; 12 .hash : { *(.hash) } 13 .dynsym : { *(.dynsym) } 14 .dynstr : { *(.dynstr) } 15 .gnu.version : { *(.gnu.version) } 16 .gnu.version_d : { *(.gnu.version_d) } 17 .gnu.version_r : { *(.gnu.version_r) } 18 .rel.init : { *(.rel.init) } 19 .rela.init : { *(.rela.init) } 20 .rel.text : 21 { 22 *(.rel.text) 23 *(.rel.text.*) 24 *(.rel.gnu.linkonce.t.*) 25 } 26 .rela.text : 27 { 28 *(.rela.text) 29 *(.rela.text.*) 30 *(.rela.gnu.linkonce.t.*) 31 } 32 .rel.fini : { *(.rel.fini) } 33 .rela.fini : { *(.rela.fini) } 34 .rel.rodata : 35 { 36 *(.rel.rodata) 37 *(.rel.rodata.*) 38 *(.rel.gnu.linkonce.r.*) 39 } 40 .rela.rodata : 41 { 42 *(.rela.rodata) 43 *(.rela.rodata.*) 44 *(.rela.gnu.linkonce.r.*) 45 } 46 .rel.data : 47 { 48 *(.rel.data) 49 *(.rel.data.*) 50 *(.rel.gnu.linkonce.d.*) 51 } 52 .rela.data : 53 { 54 *(.rela.data) 55 *(.rela.data.*) 56 *(.rela.gnu.linkonce.d.*) 57 } 58 .rel.ctors : { *(.rel.ctors) } 59 .rela.ctors : { *(.rela.ctors) } 60 .rel.dtors : { *(.rel.dtors) } 61 .rela.dtors : { *(.rela.dtors) } 62 .rel.got : { *(.rel.got) } 63 .rela.got : { *(.rela.got) } 64 .rel.sdata : 65 { 66 *(.rel.sdata) 67 *(.rel.sdata.*) 68 *(.rel.gnu.linkonce.s.*) 69 } 70 .rela.sdata : 71 { 72 *(.rela.sdata) 73 *(.rela.sdata.*) 74 *(.rela.gnu.linkonce.s.*) 75 } 76 .rel.sbss : 77 { 78 *(.rel.sbss) 79 *(.rel.sbss.*) 80 *(.rel.gnu.linkonce.sb.*) 81 } 82 .rela.sbss : 83 { 84 *(.rela.sbss) 85 *(.rela.sbss.*) 86 *(.rel.gnu.linkonce.sb.*) 87 } 88 .rel.sdata2 : 89 { 90 *(.rel.sdata2) 91 *(.rel.sdata2.*) 92 *(.rel.gnu.linkonce.s2.*) 93 } 94 .rela.sdata2 : 95 { 96 *(.rela.sdata2) 97 *(.rela.sdata2.*) 98 *(.rela.gnu.linkonce.s2.*) 99 } 100 .rel.sbss2 : 101 { 102 *(.rel.sbss2) 103 *(.rel.sbss2.*) 104 *(.rel.gnu.linkonce.sb2.*) 105 } 106 .rela.sbss2 : 107 { 108 *(.rela.sbss2) 109 *(.rela.sbss2.*) 110 *(.rela.gnu.linkonce.sb2.*) 111 } 112 .rel.bss : 113 { 114 *(.rel.bss) 115 *(.rel.bss.*) 116 *(.rel.gnu.linkonce.b.*) 117 } 118 .rela.bss : 119 { 120 *(.rela.bss) 121 *(.rela.bss.*) 122 *(.rela.gnu.linkonce.b.*) 123 } 124 .rel.plt : { *(.rel.plt) } 125 .rela.plt : { *(.rela.plt) } 126 .init : 127 { 128 KEEP (*(.init)) 129 } =0 130 .text : 131 { 132 *(.text) 133 *(.text.*) 134 *(.stub) 135 /* .gnu.warning sections are handled specially by elf32.em. */ 136 *(.gnu.warning) 137 *(.gnu.linkonce.t.*) 138 } =0 139 .fini : 140 { 141 KEEP (*(.fini)) 142 } =0 143 PROVIDE (__etext = .); 144 PROVIDE (_etext = .); 145 PROVIDE (etext = .); 146 .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } 147 .rodata1 : { *(.rodata1) } 148 /* Adjust the address for the data segment. We want to adjust up to 149 the same address within the page on the next page up. */ 150 . = ALIGN(8); 151 .data : 152 { 153 *(.data) 154 *(.data.*) 155 *(.gnu.linkonce.d.*) 156 SORT(CONSTRUCTORS) 157 } 158 .data1 : { *(.data1) } 159 .eh_frame : { KEEP (*(.eh_frame)) } 160 .gcc_except_table : { *(.gcc_except_table) } 161 .fixup : { *(.fixup) } 162 .got1 : { *(.got1) } 163 .got2 : { *(.got2) } 164 .ctors : 165 { 166 /* gcc uses crtbegin.o to find the start of 167 the constructors, so we make sure it is 168 first. Because this is a wildcard, it 169 doesn't matter if the user does not 170 actually link against crtbegin.o; the 171 linker won't look for a file to match a 172 wildcard. The wildcard also means that it 173 doesn't matter which directory crtbegin.o 174 is in. */ 175 KEEP (*crtbegin.o(.ctors)) 176 /* We don't want to include the .ctor section from 177 from the crtend.o file until after the sorted ctors. 178 The .ctor section from the crtend file contains the 179 end of ctors marker and it must be last */ 180 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) 181 KEEP (*(SORT(.ctors.*))) 182 KEEP (*(.ctors)) 183 } 184 .dtors : 185 { 186 KEEP (*crtbegin.o(.dtors)) 187 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) 188 KEEP (*(SORT(.dtors.*))) 189 KEEP (*(.dtors)) 190 } 191 .got : { *(.got.plt) *(.got) } 192 PROVIDE (_GOT_END_ = .); 193 .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) } 194 .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) } 195 .dynamic : { *(.dynamic) } 196 /* We want the small data sections together, so single-instruction offsets 197 can access them all, and initialized data all before uninitialized, so 198 we can shorten the on-disk segment size. */ 199 .sdata : 200 { 201 *(.sdata) 202 *(.sdata.*) 203 *(.gnu.linkonce.s.*) 204 } 205 _edata = .; 206 PROVIDE (edata = .); 207 __bss_start = .; 208 .sbss : 209 { 210 PROVIDE (__sbss_start = .); 211 PROVIDE (___sbss_start = .); 212 *(.dynsbss) 213 *(.sbss) 214 *(.sbss.*) 215 *(.gnu.linkonce.sb.*) 216 *(.scommon) 217 PROVIDE (__sbss_end = .); 218 PROVIDE (___sbss_end = .); 219 } 220 .plt : { *(.plt) } 221 .bss : 222 { 223 *(.dynbss) 224 *(.bss) 225 *(.bss.*) 226 *(.gnu.linkonce.b.*) 227 *(COMMON) 228 /* Align here to ensure that the .bss section occupies space up to 229 _end. Align after .bss to ensure correct alignment even if the 230 .bss section disappears because there are no input sections. */ 231 . = ALIGN(8); 232 } 233 . = ALIGN(8); 234 _end = .; 235 __end = .; 236 PROVIDE (end = .); 237 /* Stabs debugging sections. */ 238 .stab 0 : { *(.stab) } 239 .stabstr 0 : { *(.stabstr) } 240 .stab.excl 0 : { *(.stab.excl) } 241 .stab.exclstr 0 : { *(.stab.exclstr) } 242 .stab.index 0 : { *(.stab.index) } 243 .stab.indexstr 0 : { *(.stab.indexstr) } 244 .comment 0 : { *(.comment) } 245 /* DWARF debug sections. 246 Symbols in the DWARF debugging sections are relative to the beginning 247 of the section so we begin them at 0. */ 248 /* DWARF 1 */ 249 .debug 0 : { *(.debug) } 250 .line 0 : { *(.line) } 251 /* GNU DWARF 1 extensions */ 252 .debug_srcinfo 0 : { *(.debug_srcinfo) } 253 .debug_sfnames 0 : { *(.debug_sfnames) } 254 /* DWARF 1.1 and DWARF 2 */ 255 .debug_aranges 0 : { *(.debug_aranges) } 256 .debug_pubnames 0 : { *(.debug_pubnames) } 257 /* DWARF 2 */ 258 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } 259 .debug_abbrev 0 : { *(.debug_abbrev) } 260 .debug_line 0 : { *(.debug_line) } 261 .debug_frame 0 : { *(.debug_frame) } 262 .debug_str 0 : { *(.debug_str) } 263 .debug_loc 0 : { *(.debug_loc) } 264 .debug_macinfo 0 : { *(.debug_macinfo) } 265 /* SGI/MIPS DWARF 2 extensions */ 266 .debug_weaknames 0 : { *(.debug_weaknames) } 267 .debug_funcnames 0 : { *(.debug_funcnames) } 268 .debug_typenames 0 : { *(.debug_typenames) } 269 .debug_varnames 0 : { *(.debug_varnames) } 270 /* These must appear regardless of . */ 271} 272