]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/s390/kernel/vmlinux.lds.S
s390: add ppa to kernel entry / exit
[mirror_ubuntu-artful-kernel.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
8 /*
9 * Put .bss..swapper_pg_dir as the first thing in .bss. This will
10 * make sure it has 16k alignment.
11 */
12 #define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir)
13
14 /* Handle ro_after_init data on our own. */
15 #define RO_AFTER_INIT_DATA
16
17 #include <asm-generic/vmlinux.lds.h>
18
19 OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
20 OUTPUT_ARCH(s390:64-bit)
21 ENTRY(startup)
22 jiffies = jiffies_64;
23
24 PHDRS {
25 text PT_LOAD FLAGS(5); /* R_E */
26 data PT_LOAD FLAGS(7); /* RWE */
27 note PT_NOTE FLAGS(0); /* ___ */
28 }
29
30 SECTIONS
31 {
32 . = 0x00000000;
33 .text : {
34 /* Text and read-only data */
35 HEAD_TEXT
36 /*
37 * E.g. perf doesn't like symbols starting at address zero,
38 * therefore skip the initial PSW and channel program located
39 * at address zero and let _text start at 0x200.
40 */
41 _text = 0x200;
42 TEXT_TEXT
43 SCHED_TEXT
44 CPUIDLE_TEXT
45 LOCK_TEXT
46 KPROBES_TEXT
47 IRQENTRY_TEXT
48 SOFTIRQENTRY_TEXT
49 *(.fixup)
50 *(.gnu.warning)
51 } :text = 0x0700
52
53 . = ALIGN(PAGE_SIZE);
54 _etext = .; /* End of text section */
55
56 NOTES :text :note
57
58 .dummy : { *(.dummy) } :data
59
60 RO_DATA_SECTION(PAGE_SIZE)
61
62 #ifdef CONFIG_SHARED_KERNEL
63 . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
64 #endif
65
66 . = ALIGN(PAGE_SIZE);
67 _eshared = .; /* End of shareable data */
68 _sdata = .; /* Start of data section */
69
70 . = ALIGN(PAGE_SIZE);
71 __start_ro_after_init = .;
72 .data..ro_after_init : {
73 *(.data..ro_after_init)
74 }
75 EXCEPTION_TABLE(16)
76 . = ALIGN(PAGE_SIZE);
77 __end_ro_after_init = .;
78
79 RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
80
81 _edata = .; /* End of data section */
82
83 /* will be freed after init */
84 . = ALIGN(PAGE_SIZE); /* Init code and data */
85 __init_begin = .;
86
87 . = ALIGN(PAGE_SIZE);
88 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
89 VMLINUX_SYMBOL(_sinittext) = . ;
90 INIT_TEXT
91 . = ALIGN(PAGE_SIZE);
92 VMLINUX_SYMBOL(_einittext) = . ;
93 }
94
95 /*
96 * .exit.text is discarded at runtime, not link time,
97 * to deal with references from __bug_table
98 */
99 .exit.text : {
100 EXIT_TEXT
101 }
102
103 .exit.data : {
104 EXIT_DATA
105 }
106
107 /*
108 * struct alt_inst entries. From the header (alternative.h):
109 * "Alternative instructions for different CPU types or capabilities"
110 * Think locking instructions on spinlocks.
111 * Note, that it is a part of __init region.
112 */
113 . = ALIGN(8);
114 .altinstructions : {
115 __alt_instructions = .;
116 *(.altinstructions)
117 __alt_instructions_end = .;
118 __alt_nobp = .;
119 *(.altnobp)
120 __alt_nobp_end = .;
121 }
122
123 /*
124 * And here are the replacement instructions. The linker sticks
125 * them as binary blobs. The .altinstructions has enough data to
126 * get the address and the length of them to patch the kernel safely.
127 * Note, that it is a part of __init region.
128 */
129 .altinstr_replacement : {
130 *(.altinstr_replacement)
131 }
132
133 /* early.c uses stsi, which requires page aligned data. */
134 . = ALIGN(PAGE_SIZE);
135 INIT_DATA_SECTION(0x100)
136
137 PERCPU_SECTION(0x100)
138 . = ALIGN(PAGE_SIZE);
139 __init_end = .; /* freed after init ends here */
140
141 BSS_SECTION(PAGE_SIZE, 4 * PAGE_SIZE, PAGE_SIZE)
142
143 _end = . ;
144
145 /* Debugging sections. */
146 STABS_DEBUG
147 DWARF_DEBUG
148
149 /* Sections to be discarded */
150 DISCARDS
151 }