Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
[linux-2.6-block.git] / arch / s390 / kernel / vmlinux.lds.S
CommitLineData
1da177e4
LT
1/* ld script to make s390 Linux kernel
2 * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
3 */
4
0778dc3a 5#include <asm/thread_info.h>
52480ee5 6#include <asm/page.h>
1da177e4 7#include <asm-generic/vmlinux.lds.h>
1da177e4 8
347a8dc3 9#ifndef CONFIG_64BIT
1da177e4
LT
10OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
11OUTPUT_ARCH(s390)
12ENTRY(_start)
13jiffies = jiffies_64 + 4;
14#else
15OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
16OUTPUT_ARCH(s390:64-bit)
17ENTRY(_start)
18jiffies = jiffies_64;
19#endif
20
ea29ee16
MS
21PHDRS {
22 text PT_LOAD FLAGS(5); /* R_E */
23 data PT_LOAD FLAGS(7); /* RWE */
24 note PT_NOTE FLAGS(0); /* ___ */
25}
26
1da177e4
LT
27SECTIONS
28{
e16af09d
SR
29 . = 0x00000000;
30 .text : {
31 _text = .; /* Text and read-only data */
2133bb8d
TA
32 HEAD_TEXT
33 TEXT_TEXT
e16af09d
SR
34 SCHED_TEXT
35 LOCK_TEXT
36 KPROBES_TEXT
88dbd203 37 IRQENTRY_TEXT
e16af09d
SR
38 *(.fixup)
39 *(.gnu.warning)
a817a61f 40 } :text = 0x0700
1da177e4 41
e16af09d 42 _etext = .; /* End of text section */
1da177e4 43
ea29ee16 44 NOTES :text :note
ea29ee16 45
e16af09d 46 RODATA
1da177e4
LT
47
48#ifdef CONFIG_SHARED_KERNEL
52480ee5 49 . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
162e006e 50#endif
1da177e4 51
52480ee5 52 . = ALIGN(PAGE_SIZE);
e16af09d
SR
53 _eshared = .; /* End of shareable data */
54
55 . = ALIGN(16); /* Exception table */
56 __ex_table : {
57 __start___ex_table = .;
58 *(__ex_table)
59 __stop___ex_table = .;
5453c1a5 60 } :data
e16af09d 61
e16af09d
SR
62 .data : { /* Data */
63 DATA_DATA
64 CONSTRUCTORS
65 }
66
52480ee5 67 . = ALIGN(PAGE_SIZE);
e16af09d
SR
68 .data_nosave : {
69 __nosave_begin = .;
70 *(.data.nosave)
71 }
52480ee5 72 . = ALIGN(PAGE_SIZE);
e16af09d
SR
73 __nosave_end = .;
74
52480ee5 75 . = ALIGN(PAGE_SIZE);
e16af09d
SR
76 .data.page_aligned : {
77 *(.data.idt)
78 }
79
52480ee5 80 . = ALIGN(0x100);
e16af09d
SR
81 .data.cacheline_aligned : {
82 *(.data.cacheline_aligned)
83 }
84
52480ee5 85 . = ALIGN(0x100);
e16af09d
SR
86 .data.read_mostly : {
87 *(.data.read_mostly)
88 }
89 _edata = .; /* End of data section */
90
0778dc3a 91 . = ALIGN(THREAD_SIZE); /* init_task */
e16af09d
SR
92 .data.init_task : {
93 *(.data.init_task)
94 }
95
96 /* will be freed after init */
52480ee5 97 . = ALIGN(PAGE_SIZE); /* Init code and data */
e16af09d
SR
98 __init_begin = .;
99 .init.text : {
100 _sinittext = .;
01ba2bdc 101 INIT_TEXT
e16af09d
SR
102 _einittext = .;
103 }
104 /*
105 * .exit.text is discarded at runtime, not link time,
106 * to deal with references from __bug_table
107 */
108 .exit.text : {
01ba2bdc 109 EXIT_TEXT
e16af09d
SR
110 }
111
92e6ecf3
CB
112 /* early.c uses stsi, which requires page aligned data. */
113 . = ALIGN(PAGE_SIZE);
e16af09d 114 .init.data : {
01ba2bdc 115 INIT_DATA
e16af09d 116 }
52480ee5 117 . = ALIGN(0x100);
e16af09d
SR
118 .init.setup : {
119 __setup_start = .;
120 *(.init.setup)
121 __setup_end = .;
122 }
123 .initcall.init : {
124 __initcall_start = .;
125 INITCALLS
126 __initcall_end = .;
127 }
128
129 .con_initcall.init : {
130 __con_initcall_start = .;
131 *(.con_initcall.init)
132 __con_initcall_end = .;
133 }
134 SECURITY_INIT
67d38229
JPS
135
136#ifdef CONFIG_BLK_DEV_INITRD
52480ee5 137 . = ALIGN(0x100);
e16af09d
SR
138 .init.ramfs : {
139 __initramfs_start = .;
140 *(.init.ramfs)
141 . = ALIGN(2);
142 __initramfs_end = .;
143 }
67d38229 144#endif
e16af09d 145
52480ee5
SR
146 PERCPU(PAGE_SIZE)
147 . = ALIGN(PAGE_SIZE);
e16af09d
SR
148 __init_end = .; /* freed after init ends here */
149
150 /* BSS */
151 .bss : {
152 __bss_start = .;
153 *(.bss)
154 . = ALIGN(2);
155 __bss_stop = .;
156 }
157
158 _end = . ;
159
160 /* Sections to be discarded */
161 /DISCARD/ : {
01ba2bdc 162 EXIT_DATA
e16af09d
SR
163 *(.exitcall.exit)
164 }
165
166 /* Debugging sections. */
167 STABS_DEBUG
168 DWARF_DEBUG
1da177e4 169}