blob: 55c3b23612a80fcb964089111a298c5e27374832 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <asm-generic/vmlinux.lds.h>
Sam Ravnborgde078ef2009-09-25 19:53:43 +02002#include <asm/thread_info.h>
Sam Ravnborgb2b5d372007-10-16 01:26:35 -07003#include <asm/page.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07004
5OUTPUT_FORMAT("elf64-alpha")
6OUTPUT_ARCH(alpha)
7ENTRY(__start)
Roland McGrathcaf45dd2007-07-19 01:48:37 -07008PHDRS { kernel PT_LOAD; note PT_NOTE; }
Linus Torvalds1da177e2005-04-16 15:20:36 -07009jiffies = jiffies_64;
10SECTIONS
11{
12#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070013 . = 0xfffffc0000310000;
Linus Torvalds1da177e2005-04-16 15:20:36 -070014#else
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070015 . = 0xfffffc0001010000;
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#endif
17
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070018 _text = .; /* Text and read-only data */
19 .text : {
Tim Abbott92ca5232009-04-25 22:10:58 -040020 HEAD_TEXT
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070021 TEXT_TEXT
22 SCHED_TEXT
23 LOCK_TEXT
24 *(.fixup)
25 *(.gnu.warning)
26 } :kernel
27 _etext = .; /* End of text section */
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Bastian Blank51597ac2008-07-04 10:00:00 -070029 NOTES :kernel :note
30 .dummy : {
31 *(.dummy)
32 } :kernel
33
34 RODATA
35
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070036 /* Exception table */
37 . = ALIGN(16);
38 __ex_table : {
39 __start___ex_table = .;
40 *(__ex_table)
41 __stop___ex_table = .;
42 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070043
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070044 /* Will be freed after init */
45 . = ALIGN(PAGE_SIZE);
46 /* Init code and data */
47 __init_begin = .;
48 .init.text : {
49 _sinittext = .;
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010050 INIT_TEXT
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070051 _einittext = .;
52 }
53 .init.data : {
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010054 INIT_DATA
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070055 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070056
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070057 . = ALIGN(16);
58 .init.setup : {
59 __setup_start = .;
60 *(.init.setup)
61 __setup_end = .;
62 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070063
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070064 . = ALIGN(8);
65 .initcall.init : {
66 __initcall_start = .;
67 INITCALLS
68 __initcall_end = .;
69 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070070
Jean-Paul Saman67d38222007-02-10 01:44:44 -080071#ifdef CONFIG_BLK_DEV_INITRD
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070072 . = ALIGN(PAGE_SIZE);
73 .init.ramfs : {
74 __initramfs_start = .;
75 *(.init.ramfs)
76 __initramfs_end = .;
77 }
Jean-Paul Saman67d38222007-02-10 01:44:44 -080078#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070079
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070080 . = ALIGN(8);
81 .con_initcall.init : {
82 __con_initcall_start = .;
83 *(.con_initcall.init)
84 __con_initcall_end = .;
85 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070086
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070087 . = ALIGN(8);
88 SECURITY_INIT
Linus Torvalds1da177e2005-04-16 15:20:36 -070089
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070090 PERCPU(PAGE_SIZE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070091
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070092 . = ALIGN(2 * PAGE_SIZE);
93 __init_end = .;
94 /* Freed after init ends here */
Linus Torvalds1da177e2005-04-16 15:20:36 -070095
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070096 /* Note 2 page alignment above. */
97 .data.init_thread : {
98 *(.data.init_thread)
99 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700101 . = ALIGN(PAGE_SIZE);
102 .data.page_aligned : {
103 *(.data.page_aligned)
104 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700106 . = ALIGN(64);
107 .data.cacheline_aligned : {
108 *(.data.cacheline_aligned)
109 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700110
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700111 _data = .;
112 /* Data */
113 .data : {
114 DATA_DATA
115 CONSTRUCTORS
116 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700117
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700118 .got : {
119 *(.got)
120 }
121 .sdata : {
122 *(.sdata)
123 }
124 _edata = .; /* End of data section */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700126 __bss_start = .;
127 .sbss : {
128 *(.sbss)
129 *(.scommon)
130 }
131 .bss : {
132 *(.bss)
133 *(COMMON)
134 }
135 __bss_stop = .;
136 _end = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700138 .mdebug 0 : {
139 *(.mdebug)
140 }
141 .note 0 : {
142 *(.note)
143 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700144
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700145 STABS_DEBUG
146 DWARF_DEBUG
Tejun Heo023bf6f2009-07-09 11:27:40 +0900147
148 DISCARDS
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149}