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 *(.plt) 21 . = ALIGN(16); 22 } 23 _etext = .; 24 _text_size = _etext - _text; 25 . = ALIGN(4096); 26 .reloc : 27 { 28 KEEP (*(.reloc)) 29 } 30 . = ALIGN(65536); 31 .dynamic : { *(.dynamic) } 32 . = ALIGN(4096); 33 .data : 34 { 35 _data = .; 36 *(.sdata) 37 *(.data) 38 *(.data1) 39 *(.data.*) 40 *(.got.plt) 41 *(.got) 42 43 /* 44 * Note that these aren't the using the GNU "CONSTRUCTOR" output section 45 * command, so they don't start with a size. Because of p2align and the 46 * end/END definitions, and the fact that they're mergeable, they can also 47 * have NULLs which aren't guaranteed to be at the end. 48 */ 49 . = ALIGN(16); 50 __init_array_start = .; 51 *(SORT(.init_array.*)) 52 *(.init_array) 53 __init_array_end = .; 54 . = ALIGN(16); 55 __CTOR_LIST__ = .; 56 *(SORT(.ctors.*)) 57 *(.ctors) 58 __CTOR_END__ = .; 59 . = ALIGN(16); 60 __DTOR_LIST__ = .; 61 *(SORT(.dtors.*)) 62 *(.dtors) 63 __DTOR_END__ = .; 64 . = ALIGN(16); 65 __fini_array_start = .; 66 *(SORT(.fini_array.*)) 67 *(.fini_array) 68 __fini_array_end = .; 69 70 /* the EFI loader doesn't seem to like a .bss section, so we stick 71 it all into .data: */ 72 . = ALIGN(16); 73 _bss = .; 74 *(.sbss) 75 *(.scommon) 76 *(.dynbss) 77 *(.bss*) 78 *(COMMON) 79 *(.rel.local) 80 . = ALIGN(16); 81 82 _bss_end = .; 83 } 84 85 . = ALIGN(4096); 86 .rela : 87 { 88 *(.rela.text*) 89 *(.rela.data*) 90 *(.rela.got) 91 *(.rela.dyn) 92 *(.rela.stab) 93 *(.rela.init_array*) 94 *(.rela.fini_array*) 95 *(.rela.ctors*) 96 *(.rela.dtors*) 97 98 } 99 . = ALIGN(4096); 100 .rela.plt : { *(.rela.plt) } 101 . = ALIGN(4096); 102 .rodata : { *(.rodata*) } 103 . = ALIGN(512); 104 _edata = .; 105 _data_size = _edata - _data; 106 107 . = ALIGN(4096); 108 .dynsym : { *(.dynsym) } 109 . = ALIGN(4096); 110 .dynstr : { *(.dynstr) } 111 . = ALIGN(4096); 112 .note.gnu.build-id : { *(.note.gnu.build-id) } 113 .ignored.reloc : 114 { 115 *(.rela.reloc) 116 *(.note.GNU-stack) 117 } 118 .comment 0 : { *(.comment) } 119} 120