1OUTPUT_ARCH(aarch64) 2ENTRY(_start) 3 4SEARCH_DIR(/usr/lib); 5SECTIONS 6{ 7 /* Read-only sections, merged into text segment: */ 8 . = text_start; /* This is set using --defsym= on the command line. */ 9 .vmm_vectors : { *(.vmm_vectors) } 10 .text : 11 { 12 *(.text) 13 *(.stub) 14 /* .gnu.warning sections are handled specially by elf32.em. */ 15 *(.gnu.warning) 16 *(.gnu.linkonce.t*) 17 } =0x9090 18 _etext = .; 19 PROVIDE (etext = .); 20 21 .fini : { *(.fini) } =0x9090 22 .rodata : { *(.rodata*) *(.gnu.linkonce.r*) } 23 .rodata1 : { *(.rodata1) } 24 .interp : { *(.interp) } 25 .hash : { *(.hash) } 26 .dynsym : { *(.dynsym) } 27 .dynstr : { *(.dynstr) } 28 .gnu.version : { *(.gnu.version) } 29 .gnu.version_d : { *(.gnu.version_d) } 30 .gnu.version_r : { *(.gnu.version_r) } 31 .note.gnu.build-id : { 32 PROVIDE (__build_id_start = .); 33 *(.note.gnu.build-id) 34 PROVIDE (__build_id_end = .); 35 } 36 .rel.text : 37 { *(.rel.text) *(.rel.gnu.linkonce.t*) } 38 .rela.text : 39 { *(.rela.text) *(.rela.gnu.linkonce.t*) } 40 .rel.data : 41 { *(.rel.data) *(.rel.gnu.linkonce.d*) } 42 .rela.data : 43 { *(.rela.data) *(.rela.gnu.linkonce.d*) } 44 .rel.rodata : 45 { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } 46 .rela.rodata : 47 { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } 48 .rel.got : { *(.rel.got) } 49 .rela.got : { *(.rela.got) } 50 .rel.ctors : { *(.rel.ctors) } 51 .rela.ctors : { *(.rela.ctors) } 52 .rel.dtors : { *(.rel.dtors) } 53 .rela.dtors : { *(.rela.dtors) } 54 .rel.init : { *(.rel.init) } 55 .rela.init : { *(.rela.init) } 56 .rel.fini : { *(.rel.fini) } 57 .rela.fini : { *(.rela.fini) } 58 .rel.bss : { *(.rel.bss) } 59 .rela.bss : { *(.rela.bss) } 60 .rel.plt : { *(.rel.plt) } 61 .rela.plt : { *(.rela.plt) } 62 .init : { *(.init) } =0x9090 63 .plt : { *(.plt) } 64 65 . = ALIGN(4); 66 _extab_start = .; 67 PROVIDE(extab_start = .); 68 .ARM.extab : { *(.ARM.extab) } 69 _extab.end = .; 70 PROVIDE(extab_end = .); 71 72 _exidx_start = .; 73 PROVIDE(exidx_start = .); 74 .ARM.exidx : { *(.ARM.exidx) } 75 _exidx_end = .; 76 PROVIDE(exidx_end = .); 77 78 /* Adjust the address for the data segment. We want to adjust up to 79 the same address within the page on the next page up. */ 80 . = ALIGN(0x1000) + (. & (0x1000 - 1)) ; 81 .data : 82 { 83 *(.data) 84 *(.gnu.linkonce.d*) 85 } 86 . = ALIGN(128); 87 .data.read_frequently : 88 { 89 *(SORT_BY_ALIGNMENT(.data.read_frequently)) 90 } 91 .data.read_mostly : 92 { 93 *(.data.read_mostly) 94 } 95 . = ALIGN(128); 96 .data.exclusive_cache_line : 97 { 98 *(.data.exclusive_cache_line) 99 } 100 . = ALIGN(128); 101 .data1 : { *(.data1) } 102 . = ALIGN(32 / 8); 103 .init_array : 104 { 105 PROVIDE_HIDDEN (__init_array_start = .); 106 KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) 107 KEEP (*(.init_array)) 108 PROVIDE_HIDDEN (__init_array_end = .); 109 } 110 .fini_array : 111 { 112 PROVIDE_HIDDEN (__fini_array_start = .); 113 KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*))) 114 KEEP (*(.fini_array)) 115 PROVIDE_HIDDEN (__fini_array_end = .); 116 } 117 _start_ctors = .; 118 PROVIDE (start_ctors = .); 119 .ctors : 120 { 121 *(.ctors) 122 } 123 _stop_ctors = .; 124 PROVIDE (stop_ctors = .); 125 .dtors : 126 { 127 *(.dtors) 128 } 129 .got : { *(.got.plt) *(.got) } 130 .dynamic : { *(.dynamic) } 131 /* We want the small data sections together, so single-instruction offsets 132 can access them all, and initialized data all before uninitialized, so 133 we can shorten the on-disk segment size. */ 134 . = ALIGN(8); 135 .sdata : { *(.sdata) } 136 _edata = .; 137 PROVIDE (edata = .); 138 . = ALIGN(16); 139 __bss_start = .; 140 .sbss : { *(.sbss) *(.scommon) } 141 .bss : 142 { 143 *(.dynbss) 144 *(.bss) 145 *(COMMON) 146 . = ALIGN(16); 147 __bss_end = .; 148 /* A section for the initial page table, it doesn't need to be in the 149 kernel file, however unlike normal .bss entries should not be zeroed 150 out as we use it before the .bss section is cleared. */ 151 *(.init_pagetable) 152 } 153 _end = . ; 154 PROVIDE (end = .); 155 156 /* Debug */ 157 INCLUDE debuginfo.ldscript 158 159 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } 160 /DISCARD/ : { *(.note.GNU-stack) } 161} 162