1OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") 2OUTPUT_ARCH(i386) 3ENTRY(_start) 4SECTIONS 5{ 6 . = 0; 7 ImageBase = .; 8 /* .hash and/or .gnu.hash MUST come first! */ 9 .hash : { *(.hash) } 10 .gnu.hash : { *(.gnu.hash) } 11 .eh_frame : { *(.eh_frame) } 12 .gcc_except_table : { *(.gcc_except_table*) } 13 . = ALIGN(4096); 14 .text : 15 { 16 _text = .; 17 *(.text) 18 *(.text.*) 19 *(.gnu.linkonce.t.*) 20 . = ALIGN(16); 21 } 22 _etext = .; 23 _text_size = . - _text; 24 . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); 25 .data : 26 { 27 _data = .; 28 *(.got.plt) 29 *(.got) 30 *(.rodata*) 31 *(.data) 32 *(.data1) 33 *(.data.*) 34 35 /* 36 * Note that these aren't the using the GNU "CONSTRUCTOR" output section 37 * command, so they don't start with a size. Because of p2align and the 38 * end/END definitions, and the fact that they're mergeable, they can also 39 * have NULLs which aren't guaranteed to be at the end. 40 */ 41 . = ALIGN(16); 42 _init_array = .; 43 *(SORT_BY_NAME(.init_array)) 44 _init_array_end = .; 45 __CTOR_LIST__ = .; 46 *(SORT_BY_NAME(.ctors)) 47 __CTOR_END__ = .; 48 __DTOR_LIST__ = .; 49 *(SORT_BY_NAME(.dtors)) 50 __DTOR_END__ = .; 51 _fini_array = .; 52 *(SORT_BY_NAME(.fini_array)) 53 _fini_array_end = .; 54 55 /* the EFI loader doesn't seem to like a .bss section, so we stick 56 it all into .data: */ 57 *(.dynbss) 58 *(.bss*) 59 *(COMMON) 60 } 61 .note.gnu.build-id : { *(.note.gnu.build-id) } 62 63 . = ALIGN(4096); 64 .dynamic : { *(.dynamic) } 65 . = ALIGN(4096); 66 .rel : 67 { 68 *(.rel.text*) 69 *(.rel.data*) 70 *(.rel.got) 71 *(.rel.dyn) 72 *(.rel.stab) 73 *(.rel.init_array) 74 *(.rel.fini_array) 75 *(.rel.ctors) 76 *(.rel.dtors) 77 *(.data.rel.ro.local) 78 *(.data.rel.local) 79 *(.data.rel.ro) 80 *(.data.rel*) 81 } 82 . = ALIGN(4096); 83 .rel.plt : { *(.rel.plt) } 84 _edata = .; 85 _data_size = . - _etext; 86 . = ALIGN(4096); 87 .reloc : /* This is the PECOFF .reloc section! */ 88 { 89 KEEP (*(.reloc)) 90 } 91 . = ALIGN(4096); 92 .dynsym : { *(.dynsym) } 93 . = ALIGN(4096); 94 .dynstr : { *(.dynstr) } 95 . = ALIGN(4096); 96 . = DATA_SEGMENT_END (.); 97 /DISCARD/ : 98 { 99 *(.rel.reloc) 100 *(.note.GNU-stack) 101 } 102 .comment 0 : { *(.comment) } 103} 104