blob: 81acdc24348ee7fbf3ca2a53032abd69315647e5 [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
Jeff Diked1480c52006-10-30 22:07:13 -080028 _text = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -070029 _stext = .;
30 __init_begin = .;
31 .init.text : {
32 _sinittext = .;
33 *(.init.text)
34 _einittext = .;
35 }
36 . = ALIGN(4096);
Jeff Diked67b5692005-07-07 17:56:49 -070037
Linus Torvalds1da177e2005-04-16 15:20:36 -070038 .text :
39 {
Sam Ravnborg76647092007-05-13 00:31:33 +020040 TEXT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070041 SCHED_TEXT
42 LOCK_TEXT
43 *(.fixup)
44 /* .gnu.warning sections are handled specially by elf32.em. */
45 *(.gnu.warning)
46 *(.gnu.linkonce.t*)
Jeff Dikec7ec16d2007-08-30 23:56:17 -070047 }
Jeff Diked67b5692005-07-07 17:56:49 -070048
Jeff Dikec7ec16d2007-08-30 23:56:17 -070049 . = ALIGN(4096);
50 .syscall_stub : {
51 __syscall_stub_start = .;
52 *(.__syscall_stub*)
53 __syscall_stub_end = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -070054 }
55
56 #include "asm/common.lds.S"
57
58 init.data : { *(init.data) }
59 .data :
60 {
61 . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
62 *(.data.init_task)
Jeff Dikec14b8492007-05-10 22:22:34 -070063 . = ALIGN(KERNEL_STACK_SIZE);
64 *(.data.init_irqstack)
Sam Ravnborgca967252007-05-17 13:38:44 +020065 DATA_DATA
Linus Torvalds1da177e2005-04-16 15:20:36 -070066 *(.gnu.linkonce.d*)
67 CONSTRUCTORS
68 }
69 .data1 : { *(.data1) }
70 .ctors :
71 {
72 *(.ctors)
73 }
74 .dtors :
75 {
76 *(.dtors)
77 }
78
79 .got : { *(.got.plt) *(.got) }
80 .dynamic : { *(.dynamic) }
Jeff Dikeba9950c2005-05-20 13:59:07 -070081 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
82 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
Linus Torvalds1da177e2005-04-16 15:20:36 -070083 /* We want the small data sections together, so single-instruction offsets
84 can access them all, and initialized data all before uninitialized, so
85 we can shorten the on-disk segment size. */
86 .sdata : { *(.sdata) }
87 _edata = .;
88 PROVIDE (edata = .);
89 . = ALIGN(0x1000);
90 .sbss :
91 {
92 __bss_start = .;
93 PROVIDE(_bss_start = .);
94 *(.sbss)
95 *(.scommon)
96 }
97 .bss :
98 {
99 *(.dynbss)
100 *(.bss)
101 *(COMMON)
102 }
Paolo 'Blaisorblade' Giarrussoa7d0c212005-09-10 19:44:54 +0200103 _end = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104 PROVIDE (end = .);
Paolo 'Blaisorblade' Giarrussoa7d0c212005-09-10 19:44:54 +0200105
106 STABS_DEBUG
107
108 DWARF_DEBUG
Linus Torvalds1da177e2005-04-16 15:20:36 -0700109}