1OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64") 2OUTPUT_ARCH(aarch64) 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 .eh_frame : { *(.eh_frame) } 13 .gcc_except_table : { *(.gcc_except_table*) } 14 . = ALIGN(4096); 15 .text : { 16 _text = .; 17 *(.text) 18 *(.text.*) 19 *(.gnu.linkonce.t.*) 20 *(.srodata) 21 *(.rodata*) 22 . = ALIGN(16); 23 } 24 _etext = .; 25 _text_size = . - _text; 26 . = ALIGN(4096); 27 .reloc : 28 { 29 KEEP (*(.reloc)) 30 } 31 . = ALIGN(65536); 32 .dynamic : { *(.dynamic) } 33 . = ALIGN(4096); 34 .data : 35 { 36 _data = .; 37 *(.sdata) 38 *(.data) 39 *(.data1) 40 *(.data.*) 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_start = .; 52 *(SORT(.init_array.*)) 53 *(.init_array) 54 __init_array_end = .; 55 . = ALIGN(16); 56 __CTOR_LIST__ = .; 57 *(SORT(.ctors.*)) 58 *(.ctors) 59 __CTOR_END__ = .; 60 . = ALIGN(16); 61 __DTOR_LIST__ = .; 62 *(SORT(.dtors.*)) 63 *(.dtors) 64 __DTOR_END__ = .; 65 . = ALIGN(16); 66 __fini_array_start = .; 67 *(SORT(.fini_array.*)) 68 *(.fini_array) 69 __fini_array_end = .; 70 71 /* the EFI loader doesn't seem to like a .bss section, so we stick 72 it all into .data: */ 73 . = ALIGN(16); 74 _bss = .; 75 *(.sbss) 76 *(.scommon) 77 *(.dynbss) 78 *(.bss*) 79 *(COMMON) 80 *(.rel.local) 81 . = ALIGN(16); 82 83 _bss_end = .; 84 } 85 86 . = ALIGN(4096); 87 .rela : 88 { 89 *(.rela.text*) 90 *(.rela.data*) 91 *(.rela.got) 92 *(.rela.dyn) 93 *(.rela.stab) 94 *(.rela.init_array*) 95 *(.rela.fini_array*) 96 *(.rela.ctors*) 97 *(.rela.dtors*) 98 99 } 100 . = ALIGN(4096); 101 .rela.plt : { *(.rela.plt) } 102 . = ALIGN(512); 103 _edata = .; 104 _data_size = . - _data; 105 106 . = ALIGN(4096); 107 .dynsym : { *(.dynsym) } 108 . = ALIGN(4096); 109 .dynstr : { *(.dynstr) } 110 . = ALIGN(4096); 111 .note.gnu.build-id : { *(.note.gnu.build-id) } 112 .ignored.reloc : 113 { 114 *(.rela.reloc) 115 *(.note.GNU-stack) 116 } 117 .comment 0 : { *(.comment) } 118} 119