blob: b9d6568e5f7f0eb68f7ecb2dac4207a705e0e47b [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <asm-generic/vmlinux.lds.h>
Sam Ravnborgb2b5d372007-10-16 01:26:35 -07002#include <asm/page.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
4OUTPUT_FORMAT("elf64-alpha")
5OUTPUT_ARCH(alpha)
6ENTRY(__start)
Roland McGrathcaf45dd2007-07-19 01:48:37 -07007PHDRS { kernel PT_LOAD; note PT_NOTE; }
Linus Torvalds1da177e2005-04-16 15:20:36 -07008jiffies = jiffies_64;
9SECTIONS
10{
11#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070012 . = 0xfffffc0000310000;
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#else
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070014 . = 0xfffffc0001010000;
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#endif
16
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070017 _text = .; /* Text and read-only data */
18 .text : {
Tim Abbott92ca5232009-04-25 22:10:58 -040019 HEAD_TEXT
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070020 TEXT_TEXT
21 SCHED_TEXT
22 LOCK_TEXT
23 *(.fixup)
24 *(.gnu.warning)
25 } :kernel
26 _etext = .; /* End of text section */
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
Bastian Blank51597ac2008-07-04 10:00:00 -070028 NOTES :kernel :note
29 .dummy : {
30 *(.dummy)
31 } :kernel
32
33 RODATA
34
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070035 /* Exception table */
36 . = ALIGN(16);
37 __ex_table : {
38 __start___ex_table = .;
39 *(__ex_table)
40 __stop___ex_table = .;
41 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070042
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070043 /* Will be freed after init */
44 . = ALIGN(PAGE_SIZE);
45 /* Init code and data */
46 __init_begin = .;
47 .init.text : {
48 _sinittext = .;
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010049 INIT_TEXT
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070050 _einittext = .;
51 }
52 .init.data : {
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010053 INIT_DATA
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070054 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070055
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070056 . = ALIGN(16);
57 .init.setup : {
58 __setup_start = .;
59 *(.init.setup)
60 __setup_end = .;
61 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070062
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070063 . = ALIGN(8);
64 .initcall.init : {
65 __initcall_start = .;
66 INITCALLS
67 __initcall_end = .;
68 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070069
Jean-Paul Saman67d38222007-02-10 01:44:44 -080070#ifdef CONFIG_BLK_DEV_INITRD
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070071 . = ALIGN(PAGE_SIZE);
72 .init.ramfs : {
73 __initramfs_start = .;
74 *(.init.ramfs)
75 __initramfs_end = .;
76 }
Jean-Paul Saman67d38222007-02-10 01:44:44 -080077#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070078
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070079 . = ALIGN(8);
80 .con_initcall.init : {
81 __con_initcall_start = .;
82 *(.con_initcall.init)
83 __con_initcall_end = .;
84 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070085
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070086 . = ALIGN(8);
87 SECURITY_INIT
Linus Torvalds1da177e2005-04-16 15:20:36 -070088
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070089 PERCPU(PAGE_SIZE)
Linus Torvalds1da177e2005-04-16 15:20:36 -070090
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070091 . = ALIGN(2 * PAGE_SIZE);
92 __init_end = .;
93 /* Freed after init ends here */
Linus Torvalds1da177e2005-04-16 15:20:36 -070094
Sam Ravnborgb2b5d372007-10-16 01:26:35 -070095 /* Note 2 page alignment above. */
96 .data.init_thread : {
97 *(.data.init_thread)
98 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070099
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700100 . = ALIGN(PAGE_SIZE);
101 .data.page_aligned : {
102 *(.data.page_aligned)
103 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700105 . = ALIGN(64);
106 .data.cacheline_aligned : {
107 *(.data.cacheline_aligned)
108 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700109
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700110 _data = .;
111 /* Data */
112 .data : {
113 DATA_DATA
114 CONSTRUCTORS
115 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700117 .got : {
118 *(.got)
119 }
120 .sdata : {
121 *(.sdata)
122 }
123 _edata = .; /* End of data section */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700124
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700125 __bss_start = .;
126 .sbss : {
127 *(.sbss)
128 *(.scommon)
129 }
130 .bss : {
131 *(.bss)
132 *(COMMON)
133 }
134 __bss_stop = .;
135 _end = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700137 /* Sections to be discarded */
138 /DISCARD/ : {
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +0100139 EXIT_TEXT
140 EXIT_DATA
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700141 *(.exitcall.exit)
142 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700144 .mdebug 0 : {
145 *(.mdebug)
146 }
147 .note 0 : {
148 *(.note)
149 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150
Sam Ravnborgb2b5d372007-10-16 01:26:35 -0700151 STABS_DEBUG
152 DWARF_DEBUG
Linus Torvalds1da177e2005-04-16 15:20:36 -0700153}