Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[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
5#include <asm-generic/vmlinux.lds.h>
1da177e4 6
347a8dc3 7#ifndef CONFIG_64BIT
1da177e4
LT
8OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
9OUTPUT_ARCH(s390)
10ENTRY(_start)
11jiffies = jiffies_64 + 4;
12#else
13OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
14OUTPUT_ARCH(s390:64-bit)
15ENTRY(_start)
16jiffies = jiffies_64;
17#endif
18
19SECTIONS
20{
21 . = 0x00000000;
22 _text = .; /* Text and read-only data */
23 .text : {
7664709b 24 TEXT_TEXT
1da177e4
LT
25 SCHED_TEXT
26 LOCK_TEXT
4ba069b8 27 KPROBES_TEXT
1da177e4
LT
28 *(.fixup)
29 *(.gnu.warning)
30 } = 0x0700
31
32 _etext = .; /* End of text section */
33
1da177e4
LT
34 RODATA
35
36#ifdef CONFIG_SHARED_KERNEL
37 . = ALIGN(1048576); /* VM shared segments are 1MB aligned */
162e006e 38#endif
1da177e4 39
162e006e 40 . = ALIGN(4096);
1da177e4 41 _eshared = .; /* End of shareable data */
1da177e4 42
fe355b7f
HY
43 . = ALIGN(16); /* Exception table */
44 __start___ex_table = .;
45 __ex_table : { *(__ex_table) }
46 __stop___ex_table = .;
47
86ead9ca
RM
48 NOTES
49
c0007f1a
HC
50 BUG_TABLE
51
1da177e4 52 .data : { /* Data */
ca967258 53 DATA_DATA
1da177e4
LT
54 CONSTRUCTORS
55 }
56
57 . = ALIGN(4096);
58 __nosave_begin = .;
59 .data_nosave : { *(.data.nosave) }
60 . = ALIGN(4096);
61 __nosave_end = .;
62
63 . = ALIGN(4096);
64 .data.page_aligned : { *(.data.idt) }
65
58268b97 66 . = ALIGN(256);
1da177e4
LT
67 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
68
58268b97
CB
69 . = ALIGN(256);
70 .data.read_mostly : { *(.data.read_mostly) }
1da177e4
LT
71 _edata = .; /* End of data section */
72
73 . = ALIGN(8192); /* init_task */
74 .data.init_task : { *(.data.init_task) }
75
76 /* will be freed after init */
77 . = ALIGN(4096); /* Init code and data */
78 __init_begin = .;
79 .init.text : {
80 _sinittext = .;
81 *(.init.text)
82 _einittext = .;
83 }
c0007f1a
HC
84 /*
85 * .exit.text is discarded at runtime, not link time,
86 * to deal with references from __bug_table
87 */
88 .exit.text : { *(.exit.text) }
89
1da177e4
LT
90 .init.data : { *(.init.data) }
91 . = ALIGN(256);
92 __setup_start = .;
93 .init.setup : { *(.init.setup) }
94 __setup_end = .;
95 __initcall_start = .;
96 .initcall.init : {
61ce1efe 97 INITCALLS
1da177e4
LT
98 }
99 __initcall_end = .;
100 __con_initcall_start = .;
101 .con_initcall.init : { *(.con_initcall.init) }
102 __con_initcall_end = .;
103 SECURITY_INIT
67d38229
JPS
104
105#ifdef CONFIG_BLK_DEV_INITRD
1da177e4
LT
106 . = ALIGN(256);
107 __initramfs_start = .;
108 .init.ramfs : { *(.init.initramfs) }
109 . = ALIGN(2);
110 __initramfs_end = .;
67d38229 111#endif
5fb7dc37 112 PERCPU(4096)
1da177e4
LT
113 . = ALIGN(4096);
114 __init_end = .;
115 /* freed after init ends here */
116
117 __bss_start = .; /* BSS */
118 .bss : { *(.bss) }
119 . = ALIGN(2);
120 __bss_stop = .;
121
122 _end = . ;
123
124 /* Sections to be discarded */
125 /DISCARD/ : {
c0007f1a 126 *(.exit.data) *(.exitcall.exit)
1da177e4
LT
127 }
128
129 /* Stabs debugging sections. */
130 .stab 0 : { *(.stab) }
131 .stabstr 0 : { *(.stabstr) }
132 .stab.excl 0 : { *(.stab.excl) }
133 .stab.exclstr 0 : { *(.stab.exclstr) }
134 .stab.index 0 : { *(.stab.index) }
135 .stab.indexstr 0 : { *(.stab.indexstr) }
136 .comment 0 : { *(.comment) }
137}