1#include <asm-generic/vmlinux.lds.h> 2 3OUTPUT_FORMAT(ELF_FORMAT) 4OUTPUT_ARCH(ELF_ARCH) 5ENTRY(_start) 6jiffies = jiffies_64; 7 8SECTIONS 9{ 10 PROVIDE (__executable_start = START); 11 . = START + SIZEOF_HEADERS; 12 .interp : { *(.interp) } 13 /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start 14 * is remapped.*/ 15 __binary_start = .; 16 . = ALIGN(4096); /* Init code and data */ 17 _stext = .; 18 __init_begin = .; 19 .init.text : { 20 _sinittext = .; 21 *(.init.text) 22 _einittext = .; 23 } 24 25 . = ALIGN(4096); 26 27 /* Read-only sections, merged into text segment: */ 28 .hash : { *(.hash) } 29 .dynsym : { *(.dynsym) } 30 .dynstr : { *(.dynstr) } 31 .gnu.version : { *(.gnu.version) } 32 .gnu.version_d : { *(.gnu.version_d) } 33 .gnu.version_r : { *(.gnu.version_r) } 34 .rel.init : { *(.rel.init) } 35 .rela.init : { *(.rela.init) } 36 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } 37 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } 38 .rel.fini : { *(.rel.fini) } 39 .rela.fini : { *(.rela.fini) } 40 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } 41 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } 42 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } 43 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } 44 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } 45 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } 46 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } 47 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } 48 .rel.ctors : { *(.rel.ctors) } 49 .rela.ctors : { *(.rela.ctors) } 50 .rel.dtors : { *(.rel.dtors) } 51 .rela.dtors : { *(.rela.dtors) } 52 .rel.got : { *(.rel.got) } 53 .rela.got : { *(.rela.got) } 54 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } 55 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } 56 .rel.plt : { *(.rel.plt) } 57 .rela.plt : { *(.rela.plt) } 58 .init : { 59 KEEP (*(.init)) 60 } =0x90909090 61 .plt : { *(.plt) } 62 .text : { 63 *(.text) 64 SCHED_TEXT 65 LOCK_TEXT 66 *(.fixup) 67 *(.stub .text.* .gnu.linkonce.t.*) 68 /* .gnu.warning sections are handled specially by elf32.em. */ 69 *(.gnu.warning) 70 } =0x90909090 71 .fini : { 72 KEEP (*(.fini)) 73 } =0x90909090 74 75 .kstrtab : { *(.kstrtab) } 76 77 #include "asm/common.lds.S" 78 79 init.data : { *(.init.data) } 80 81 /* Ensure the __preinit_array_start label is properly aligned. We 82 could instead move the label definition inside the section, but 83 the linker would then create the section even if it turns out to 84 be empty, which isn't pretty. */ 85 . = ALIGN(32 / 8); 86 .preinit_array : { *(.preinit_array) } 87 .init_array : { *(.init_array) } 88 .fini_array : { *(.fini_array) } 89 .data : { 90 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ 91 *(.data.init_task) 92 *(.data .data.* .gnu.linkonce.d.*) 93 SORT(CONSTRUCTORS) 94 } 95 .data1 : { *(.data1) } 96 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } 97 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } 98 .eh_frame : { KEEP (*(.eh_frame)) } 99 .gcc_except_table : { *(.gcc_except_table) } 100 .dynamic : { *(.dynamic) } 101 .ctors : { 102 /* gcc uses crtbegin.o to find the start of 103 the constructors, so we make sure it is 104 first. Because this is a wildcard, it 105 doesn't matter if the user does not 106 actually link against crtbegin.o; the 107 linker won't look for a file to match a 108 wildcard. The wildcard also means that it 109 doesn't matter which directory crtbegin.o 110 is in. */ 111 KEEP (*crtbegin.o(.ctors)) 112 /* We don't want to include the .ctor section from 113 from the crtend.o file until after the sorted ctors. 114 The .ctor section from the crtend file contains the 115 end of ctors marker and it must be last */ 116 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) 117 KEEP (*(SORT(.ctors.*))) 118 KEEP (*(.ctors)) 119 } 120 .dtors : { 121 KEEP (*crtbegin.o(.dtors)) 122 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) 123 KEEP (*(SORT(.dtors.*))) 124 KEEP (*(.dtors)) 125 } 126 .jcr : { KEEP (*(.jcr)) } 127 .got : { *(.got.plt) *(.got) } 128 _edata = .; 129 PROVIDE (edata = .); 130 __bss_start = .; 131 .bss : { 132 *(.dynbss) 133 *(.bss .bss.* .gnu.linkonce.b.*) 134 *(COMMON) 135 /* Align here to ensure that the .bss section occupies space up to 136 _end. Align after .bss to ensure correct alignment even if the 137 .bss section disappears because there are no input sections. */ 138 . = ALIGN(32 / 8); 139 . = ALIGN(32 / 8); 140 } 141 _end = .; 142 PROVIDE (end = .); 143 /* Stabs debugging sections. */ 144 .stab 0 : { *(.stab) } 145 .stabstr 0 : { *(.stabstr) } 146 .stab.excl 0 : { *(.stab.excl) } 147 .stab.exclstr 0 : { *(.stab.exclstr) } 148 .stab.index 0 : { *(.stab.index) } 149 .stab.indexstr 0 : { *(.stab.indexstr) } 150 .comment 0 : { *(.comment) } 151 /* DWARF debug sections. 152 Symbols in the DWARF debugging sections are relative to the beginning 153 of the section so we begin them at 0. */ 154 /* DWARF 1 */ 155 .debug 0 : { *(.debug) } 156 .line 0 : { *(.line) } 157 /* GNU DWARF 1 extensions */ 158 .debug_srcinfo 0 : { *(.debug_srcinfo) } 159 .debug_sfnames 0 : { *(.debug_sfnames) } 160 /* DWARF 1.1 and DWARF 2 */ 161 .debug_aranges 0 : { *(.debug_aranges) } 162 .debug_pubnames 0 : { *(.debug_pubnames) } 163 /* DWARF 2 */ 164 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } 165 .debug_abbrev 0 : { *(.debug_abbrev) } 166 .debug_line 0 : { *(.debug_line) } 167 .debug_frame 0 : { *(.debug_frame) } 168 .debug_str 0 : { *(.debug_str) } 169 .debug_loc 0 : { *(.debug_loc) } 170 .debug_macinfo 0 : { *(.debug_macinfo) } 171 /* SGI/MIPS DWARF 2 extensions */ 172 .debug_weaknames 0 : { *(.debug_weaknames) } 173 .debug_funcnames 0 : { *(.debug_funcnames) } 174 .debug_typenames 0 : { *(.debug_typenames) } 175 .debug_varnames 0 : { *(.debug_varnames) } 176} 177