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