blob: 5828c1d54505f7fa0603c86a1b819fd52e528e7a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <asm-generic/vmlinux.lds.h>
2
3OUTPUT_FORMAT(ELF_FORMAT)
4OUTPUT_ARCH(ELF_ARCH)
5ENTRY(_start)
6jiffies = jiffies_64;
7
8SECTIONS
9{
Jeff Dike23bbd582006-07-10 04:45:06 -070010 /* This must contain the right address - not quite the default ELF one.*/
Linus Torvalds1da177e2005-04-16 15:20:36 -070011 PROVIDE (__executable_start = START);
Jeff Dike23bbd582006-07-10 04:45:06 -070012 /* Static binaries stick stuff here, like the sigreturn trampoline,
13 * invisibly to objdump. So, just make __binary_start equal to the very
14 * beginning of the executable, and if there are unmapped pages after this,
15 * they are forever unusable.
16 */
17 __binary_start = START;
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
Jeff Dike23bbd582006-07-10 04:45:06 -070019 . = START + SIZEOF_HEADERS;
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
Jeff Diked1480c52006-10-30 22:07:13 -080021 _text = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -070022 _stext = .;
23 __init_begin = .;
24 .init.text : {
25 _sinittext = .;
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010026 INIT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 _einittext = .;
28 }
29 . = ALIGN(4096);
Jeff Diked67b5692005-07-07 17:56:49 -070030
Linus Torvalds1da177e2005-04-16 15:20:36 -070031 .text :
32 {
Sam Ravnborg76647092007-05-13 00:31:33 +020033 TEXT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070034 SCHED_TEXT
35 LOCK_TEXT
36 *(.fixup)
37 /* .gnu.warning sections are handled specially by elf32.em. */
38 *(.gnu.warning)
39 *(.gnu.linkonce.t*)
Jeff Dikec7ec16d2007-08-30 23:56:17 -070040 }
Jeff Diked67b5692005-07-07 17:56:49 -070041
Jeff Dikec7ec16d2007-08-30 23:56:17 -070042 . = ALIGN(4096);
43 .syscall_stub : {
44 __syscall_stub_start = .;
45 *(.__syscall_stub*)
46 __syscall_stub_end = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -070047 }
48
49 #include "asm/common.lds.S"
50
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010051 init.data : { INIT_DATA }
Linus Torvalds1da177e2005-04-16 15:20:36 -070052 .data :
53 {
54 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
55 *(.data.init_task)
Jeff Dikec14b8492007-05-10 22:22:34 -070056 . = ALIGN(KERNEL_STACK_SIZE);
57 *(.data.init_irqstack)
Sam Ravnborgca967252007-05-17 13:38:44 +020058 DATA_DATA
Linus Torvalds1da177e2005-04-16 15:20:36 -070059 *(.gnu.linkonce.d*)
60 CONSTRUCTORS
61 }
62 .data1 : { *(.data1) }
63 .ctors :
64 {
65 *(.ctors)
66 }
67 .dtors :
68 {
69 *(.dtors)
70 }
71
72 .got : { *(.got.plt) *(.got) }
73 .dynamic : { *(.dynamic) }
Jeff Dikeba9950c2005-05-20 13:59:07 -070074 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
75 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
Linus Torvalds1da177e2005-04-16 15:20:36 -070076 /* We want the small data sections together, so single-instruction offsets
77 can access them all, and initialized data all before uninitialized, so
78 we can shorten the on-disk segment size. */
79 .sdata : { *(.sdata) }
80 _edata = .;
81 PROVIDE (edata = .);
82 . = ALIGN(0x1000);
83 .sbss :
84 {
85 __bss_start = .;
86 PROVIDE(_bss_start = .);
87 *(.sbss)
88 *(.scommon)
89 }
90 .bss :
91 {
92 *(.dynbss)
93 *(.bss)
94 *(COMMON)
95 }
Paolo 'Blaisorblade' Giarrussoa7d0c212005-09-10 19:44:54 +020096 _end = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -070097 PROVIDE (end = .);
Paolo 'Blaisorblade' Giarrussoa7d0c212005-09-10 19:44:54 +020098
99 STABS_DEBUG
100
101 DWARF_DEBUG
Linus Torvalds1da177e2005-04-16 15:20:36 -0700102}