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