f6b16aec32e7dd71bd129ba506fe08202c62660a
[safe/jmp/linux-2.6] / arch / s390 / kernel / vmlinux.lds.S
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>
6
7 #ifndef CONFIG_64BIT
8 OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
9 OUTPUT_ARCH(s390)
10 ENTRY(_start)
11 jiffies = jiffies_64 + 4;
12 #else
13 OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
14 OUTPUT_ARCH(s390:64-bit)
15 ENTRY(_start)
16 jiffies = jiffies_64;
17 #endif
18
19 SECTIONS
20 {
21         . = 0x00000000;
22         .text : {
23         _text = .;              /* Text and read-only data */
24                 *(.text.head)
25         TEXT_TEXT
26                 SCHED_TEXT
27                 LOCK_TEXT
28                 KPROBES_TEXT
29                 *(.fixup)
30                 *(.gnu.warning)
31         } = 0x0700
32
33         _etext = .;             /* End of text section */
34
35         RODATA
36
37 #ifdef CONFIG_SHARED_KERNEL
38         . = ALIGN(1048576);     /* VM shared segments are 1MB aligned */
39 #endif
40
41         . = ALIGN(4096);
42         _eshared = .;           /* End of shareable data */
43
44         . = ALIGN(16);          /* Exception table */
45         __ex_table : {
46                 __start___ex_table = .;
47                 *(__ex_table)
48                 __stop___ex_table = .;
49         }
50
51         NOTES
52         BUG_TABLE
53
54         .data : {               /* Data */
55                 DATA_DATA
56                 CONSTRUCTORS
57         }
58
59         . = ALIGN(4096);
60         .data_nosave : {
61         __nosave_begin = .;
62                 *(.data.nosave)
63         }
64         . = ALIGN(4096);
65         __nosave_end = .;
66
67         . = ALIGN(4096);
68         .data.page_aligned : {
69                 *(.data.idt)
70         }
71
72         . = ALIGN(256);
73         .data.cacheline_aligned : {
74                 *(.data.cacheline_aligned)
75         }
76
77         . = ALIGN(256);
78         .data.read_mostly : {
79                 *(.data.read_mostly)
80         }
81         _edata = .;             /* End of data section */
82
83         . = ALIGN(8192);        /* init_task */
84         .data.init_task : {
85                 *(.data.init_task)
86         }
87
88         /* will be freed after init */
89         . = ALIGN(4096);        /* Init code and data */
90         __init_begin = .;
91         .init.text : {
92                 _sinittext = .;
93                 *(.init.text)
94                 _einittext = .;
95         }
96         /*
97          * .exit.text is discarded at runtime, not link time,
98          * to deal with references from __bug_table
99         */
100         .exit.text : {
101                 *(.exit.text)
102         }
103
104         .init.data : {
105                 *(.init.data)
106         }
107         . = ALIGN(256);
108         .init.setup : {
109                 __setup_start = .;
110                 *(.init.setup)
111                 __setup_end = .;
112         }
113         .initcall.init : {
114                 __initcall_start = .;
115                 INITCALLS
116                 __initcall_end = .;
117         }
118
119         .con_initcall.init : {
120                 __con_initcall_start = .;
121                 *(.con_initcall.init)
122                 __con_initcall_end = .;
123         }
124         SECURITY_INIT
125
126 #ifdef CONFIG_BLK_DEV_INITRD
127         . = ALIGN(256);
128         .init.ramfs : {
129                 __initramfs_start = .;
130                 *(.init.ramfs)
131                 . = ALIGN(2);
132                 __initramfs_end = .;
133         }
134 #endif
135
136         PERCPU(4096)
137         . = ALIGN(4096);
138         __init_end = .;         /* freed after init ends here */
139
140         /* BSS */
141         .bss : {
142                 __bss_start = .;
143                 *(.bss)
144                 . = ALIGN(2);
145                 __bss_stop = .;
146         }
147
148         _end = . ;
149
150         /* Sections to be discarded */
151         /DISCARD/ : {
152                 *(.exit.data)
153                 *(.exitcall.exit)
154         }
155
156         /* Debugging sections.  */
157         STABS_DEBUG
158         DWARF_DEBUG
159 }