]> git.karo-electronics.de Git - linux-beck.git/blob - arch/s390/kernel/vmlinux.lds.S
[S390] Use macros for .data.page_aligned.
[linux-beck.git] / 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/thread_info.h>
6 #include <asm/page.h>
7 #include <asm-generic/vmlinux.lds.h>
8
9 #ifndef CONFIG_64BIT
10 OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
11 OUTPUT_ARCH(s390)
12 ENTRY(_start)
13 jiffies = jiffies_64 + 4;
14 #else
15 OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
16 OUTPUT_ARCH(s390:64-bit)
17 ENTRY(_start)
18 jiffies = jiffies_64;
19 #endif
20
21 PHDRS {
22         text PT_LOAD FLAGS(5);  /* R_E */
23         data PT_LOAD FLAGS(7);  /* RWE */
24         note PT_NOTE FLAGS(0);  /* ___ */
25 }
26
27 SECTIONS
28 {
29         . = 0x00000000;
30         .text : {
31         _text = .;              /* Text and read-only data */
32                 HEAD_TEXT
33                 TEXT_TEXT
34                 SCHED_TEXT
35                 LOCK_TEXT
36                 KPROBES_TEXT
37                 IRQENTRY_TEXT
38                 *(.fixup)
39                 *(.gnu.warning)
40         } :text = 0x0700
41
42         _etext = .;             /* End of text section */
43
44         NOTES :text :note
45
46         RODATA
47
48 #ifdef CONFIG_SHARED_KERNEL
49         . = ALIGN(0x100000);    /* VM shared segments are 1MB aligned */
50 #endif
51
52         . = ALIGN(PAGE_SIZE);
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 = .;
60         } :data
61
62         .data : {               /* Data */
63                 PAGE_ALIGNED_DATA(PAGE_SIZE)
64                 DATA_DATA
65                 CONSTRUCTORS
66         }
67
68         . = ALIGN(PAGE_SIZE);
69         .data_nosave : {
70         __nosave_begin = .;
71                 *(.data.nosave)
72         }
73         . = ALIGN(PAGE_SIZE);
74         __nosave_end = .;
75
76         . = ALIGN(0x100);
77         .data.cacheline_aligned : {
78                 *(.data.cacheline_aligned)
79         }
80
81         . = ALIGN(0x100);
82         .data.read_mostly : {
83                 *(.data.read_mostly)
84         }
85         _edata = .;             /* End of data section */
86
87         . = ALIGN(THREAD_SIZE); /* init_task */
88         .data.init_task : {
89                 *(.data.init_task)
90         }
91
92         /* will be freed after init */
93         . = ALIGN(PAGE_SIZE);   /* Init code and data */
94         __init_begin = .;
95         .init.text : {
96                 _sinittext = .;
97                 INIT_TEXT
98                 _einittext = .;
99         }
100         /*
101          * .exit.text is discarded at runtime, not link time,
102          * to deal with references from __bug_table
103         */
104         .exit.text : {
105                 EXIT_TEXT
106         }
107
108         /* early.c uses stsi, which requires page aligned data. */
109         . = ALIGN(PAGE_SIZE);
110         .init.data : {
111                 INIT_DATA
112         }
113         . = ALIGN(0x100);
114         .init.setup : {
115                 __setup_start = .;
116                 *(.init.setup)
117                 __setup_end = .;
118         }
119         .initcall.init : {
120                 __initcall_start = .;
121                 INITCALLS
122                 __initcall_end = .;
123         }
124
125         .con_initcall.init : {
126                 __con_initcall_start = .;
127                 *(.con_initcall.init)
128                 __con_initcall_end = .;
129         }
130         SECURITY_INIT
131
132 #ifdef CONFIG_BLK_DEV_INITRD
133         . = ALIGN(0x100);
134         .init.ramfs : {
135                 __initramfs_start = .;
136                 *(.init.ramfs)
137                 . = ALIGN(2);
138                 __initramfs_end = .;
139         }
140 #endif
141
142         PERCPU(PAGE_SIZE)
143         . = ALIGN(PAGE_SIZE);
144         __init_end = .;         /* freed after init ends here */
145
146         /* BSS */
147         .bss : {
148                 __bss_start = .;
149                 *(.bss)
150                 . = ALIGN(2);
151                 __bss_stop = .;
152         }
153
154         _end = . ;
155
156         /* Sections to be discarded */
157         /DISCARD/ : {
158                 EXIT_DATA
159                 *(.exitcall.exit)
160         }
161
162         /* Debugging sections.  */
163         STABS_DEBUG
164         DWARF_DEBUG
165 }