1#include <asm-generic/vmlinux.lds.h> 2#include <asm/page.h> 3 4OUTPUT_FORMAT(ELF_FORMAT) 5OUTPUT_ARCH(ELF_ARCH) 6ENTRY(_start) 7jiffies = jiffies_64; 8 9VERSION { 10 { 11 local: *; 12 }; 13} 14 15SECTIONS 16{ 17 /* This must contain the right address - not quite the default ELF one.*/ 18 PROVIDE (__executable_start = START); 19 /* Static binaries stick stuff here, like the sigreturn trampoline, 20 * invisibly to objdump. So, just make __binary_start equal to the very 21 * beginning of the executable, and if there are unmapped pages after this, 22 * they are forever unusable. 23 */ 24 __binary_start = START; 25 26 . = START + SIZEOF_HEADERS; 27 28 _text = .; 29 INIT_TEXT_SECTION(0) 30 . = ALIGN(PAGE_SIZE); 31 32 .text : 33 { 34 _stext = .; 35 TEXT_TEXT 36 SCHED_TEXT 37 LOCK_TEXT 38 *(.fixup) 39 /* .gnu.warning sections are handled specially by elf32.em. */ 40 *(.gnu.warning) 41 *(.gnu.linkonce.t*) 42 } 43 44 . = ALIGN(PAGE_SIZE); 45 .syscall_stub : { 46 __syscall_stub_start = .; 47 *(.__syscall_stub*) 48 __syscall_stub_end = .; 49 } 50 51 /* 52 * These are needed even in a static link, even if they wind up being empty. 53 * Newer glibc needs these __rel{,a}_iplt_{start,end} symbols. 54 */ 55 .rel.plt : { 56 *(.rel.plt) 57 PROVIDE_HIDDEN(__rel_iplt_start = .); 58 *(.rel.iplt) 59 PROVIDE_HIDDEN(__rel_iplt_end = .); 60 } 61 .rela.plt : { 62 *(.rela.plt) 63 PROVIDE_HIDDEN(__rela_iplt_start = .); 64 *(.rela.iplt) 65 PROVIDE_HIDDEN(__rela_iplt_end = .); 66 } 67 68 #include <asm/common.lds.S> 69 70 __init_begin = .; 71 init.data : { INIT_DATA } 72 __init_end = .; 73 74 .data : 75 { 76 INIT_TASK_DATA(KERNEL_STACK_SIZE) 77 . = ALIGN(KERNEL_STACK_SIZE); 78 *(.data..init_irqstack) 79 DATA_DATA 80 *(.gnu.linkonce.d*) 81 CONSTRUCTORS 82 } 83 .data1 : { *(.data1) } 84 .ctors : 85 { 86 *(.ctors) 87 } 88 .dtors : 89 { 90 *(.dtors) 91 } 92 93 .got : { *(.got.plt) *(.got) } 94 .dynamic : { *(.dynamic) } 95 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } 96 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } 97 /* We want the small data sections together, so single-instruction offsets 98 can access them all, and initialized data all before uninitialized, so 99 we can shorten the on-disk segment size. */ 100 .sdata : { *(.sdata) } 101 _edata = .; 102 PROVIDE (edata = .); 103 . = ALIGN(PAGE_SIZE); 104 __bss_start = .; 105 PROVIDE(_bss_start = .); 106 SBSS(0) 107 BSS(0) 108 __bss_stop = .; 109 _end = .; 110 PROVIDE (end = .); 111 112 STABS_DEBUG 113 114 DWARF_DEBUG 115 116 DISCARDS 117} 118