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