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 . = ALIGN(4096); 12 .text : 13 { 14 _text = .; 15 *(.text) 16 *(.text.*) 17 *(.gnu.linkonce.t.*) 18 . = ALIGN(16); 19 } 20 _etext = .; 21 _text_size = . - _text; 22 . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); 23 .sdata : 24 { 25 _data = .; 26 *(.got.plt) 27 *(.got) 28 *(.srodata) 29 *(.sdata) 30 *(.sbss) 31 *(.scommon) 32 } 33 . = ALIGN(4096); 34 .data : 35 { 36 *(.rodata*) 37 *(.data) 38 *(.data1) 39 *(.data.*) 40 *(.sdata) 41 *(.got.plt) 42 *(.got) 43 /* the EFI loader doesn't seem to like a .bss section, so we stick 44 it all into .data: */ 45 *(.sbss) 46 *(.scommon) 47 *(.dynbss) 48 *(.bss) 49 *(COMMON) 50 } 51 .note.gnu.build-id : { *(.note.gnu.build-id) } 52 53 . = ALIGN(4096); 54 .dynamic : { *(.dynamic) } 55 . = ALIGN(4096); 56 .rel : 57 { 58 *(.rel.text*) 59 *(.rel.sdata*) 60 *(.rel.data*) 61 *(.rel.got) 62 *(.rel.plt) 63 *(.rel.stab) 64 *(.data.rel.ro.local) 65 *(.data.rel.local) 66 *(.data.rel.ro) 67 *(.data.rel*) 68 } 69 _edata = .; 70 _data_size = . - _etext; 71 . = ALIGN(4096); 72 .reloc : /* This is the PECOFF .reloc section! */ 73 { 74 *(.reloc) 75 } 76 . = ALIGN(4096); 77 .dynsym : { *(.dynsym) } 78 . = ALIGN(4096); 79 .dynstr : { *(.dynstr) } 80 . = ALIGN(4096); 81 . = DATA_SEGMENT_END (.); 82 /DISCARD/ : 83 { 84 *(.rel.reloc) 85 *(.eh_frame) 86 *(.note.GNU-stack) 87 } 88 .comment 0 : { *(.comment) } 89} 90