1OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd", "elf32-i386-freebsd") 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 . = ALIGN(4096); 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 44 /* 45 * Note that these aren't the using the GNU "CONSTRUCTOR" output section 46 * command, so they don't start with a size. Because of p2align and the 47 * end/END definitions, and the fact that they're mergeable, they can also 48 * have NULLs which aren't guaranteed to be at the end. 49 */ 50 . = ALIGN(16); 51 _init_array = .; 52 *(SORT(.init_array.*)) 53 *(.init_array) 54 _init_array_end = .; 55 __CTOR_LIST__ = .; 56 *(SORT(.ctors.*)) 57 *(.ctors) 58 __CTOR_END__ = .; 59 __DTOR_LIST__ = .; 60 *(SORT(.dtors.*)) 61 *(.dtors) 62 __DTOR_END__ = .; 63 _fini_array = .; 64 *(SORT(.fini_array.*)) 65 *(.fini_array) 66 _fini_array_end = .; 67 68 /* the EFI loader doesn't seem to like a .bss section, so we stick 69 it all into .data: */ 70 *(.sbss) 71 *(.scommon) 72 *(.dynbss) 73 *(.bss) 74 *(COMMON) 75 } 76 .note.gnu.build-id : { *(.note.gnu.build-id) } 77 78 . = ALIGN(4096); 79 .dynamic : { *(.dynamic) } 80 . = ALIGN(4096); 81 .rel : 82 { 83 *(.rel.data) 84 *(.rel.data.*) 85 *(.rel.got) 86 *(.rel.stab) 87 *(.rel.init_array*) 88 *(.rel.fini_array*) 89 *(.rel.ctors*) 90 *(.rel.dtors*) 91 *(.data.rel.ro.local) 92 *(.data.rel.local) 93 *(.data.rel.ro) 94 *(.data.rel*) 95 } 96 _edata = .; 97 _data_size = . - _etext; 98 . = ALIGN(4096); 99 .reloc : /* This is the PECOFF .reloc section! */ 100 { 101 *(.reloc) 102 } 103 . = ALIGN(4096); 104 .dynsym : { *(.dynsym) } 105 . = ALIGN(4096); 106 .dynstr : { *(.dynstr) } 107 . = ALIGN(4096); 108 /DISCARD/ : 109 { 110 *(.rel.reloc) 111 *(.eh_frame) 112 *(.note.GNU-stack) 113 } 114 .comment 0 : { *(.comment) } 115} 116