blob: 8eca47a6ff082f171d76777ebb46d2601c282dcf [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
Paolo 'Blaisorblade' Giarrusso60b27372005-06-21 17:16:25 -070021#ifdef MODE_TT
Paolo 'Blaisorblade' Giarrusso1c303852005-07-14 00:33:38 -070022 .remap_data : { UNMAP_PATH (.data .bss) }
23 .remap : { UNMAP_PATH (.text) }
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
25 . = ALIGN(4096); /* Init code and data */
26#endif
27
28 _stext = .;
29 __init_begin = .;
30 .init.text : {
31 _sinittext = .;
32 *(.init.text)
33 _einittext = .;
34 }
35 . = ALIGN(4096);
Jeff Diked67b5692005-07-07 17:56:49 -070036
Linus Torvalds1da177e2005-04-16 15:20:36 -070037 .text :
38 {
39 *(.text)
40 SCHED_TEXT
41 LOCK_TEXT
42 *(.fixup)
43 /* .gnu.warning sections are handled specially by elf32.em. */
44 *(.gnu.warning)
45 *(.gnu.linkonce.t*)
Jeff Diked67b5692005-07-07 17:56:49 -070046
47 . = ALIGN(4096);
48 __syscall_stub_start = .;
49 *(.__syscall_stub*)
50 __syscall_stub_end = .;
51 . = ALIGN(4096);
Linus Torvalds1da177e2005-04-16 15:20:36 -070052 }
53
54 #include "asm/common.lds.S"
55
56 init.data : { *(init.data) }
57 .data :
58 {
59 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
60 *(.data.init_task)
61 *(.data)
62 *(.gnu.linkonce.d*)
63 CONSTRUCTORS
64 }
65 .data1 : { *(.data1) }
66 .ctors :
67 {
68 *(.ctors)
69 }
70 .dtors :
71 {
72 *(.dtors)
73 }
74
75 .got : { *(.got.plt) *(.got) }
76 .dynamic : { *(.dynamic) }
Jeff Dikeba9950c2005-05-20 13:59:07 -070077 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
78 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
Linus Torvalds1da177e2005-04-16 15:20:36 -070079 /* We want the small data sections together, so single-instruction offsets
80 can access them all, and initialized data all before uninitialized, so
81 we can shorten the on-disk segment size. */
82 .sdata : { *(.sdata) }
83 _edata = .;
84 PROVIDE (edata = .);
85 . = ALIGN(0x1000);
86 .sbss :
87 {
88 __bss_start = .;
89 PROVIDE(_bss_start = .);
90 *(.sbss)
91 *(.scommon)
92 }
93 .bss :
94 {
95 *(.dynbss)
96 *(.bss)
97 *(COMMON)
98 }
Paolo 'Blaisorblade' Giarrussoa7d0c212005-09-10 19:44:54 +020099 _end = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100 PROVIDE (end = .);
Paolo 'Blaisorblade' Giarrussoa7d0c212005-09-10 19:44:54 +0200101
102 STABS_DEBUG
103
104 DWARF_DEBUG
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105}