]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - arch/s390/kernel/vmlinux.lds.S
Merge remote-tracking branch 'regulator/fix/max77802' into regulator-linus
[mirror_ubuntu-artful-kernel.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>
0ccb32c9
HC
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
d07a980c
HC
14/* Handle ro_after_init data on our own. */
15#define RO_AFTER_INIT_DATA
16
1da177e4 17#include <asm-generic/vmlinux.lds.h>
1da177e4 18
1da177e4
LT
19OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
20OUTPUT_ARCH(s390:64-bit)
e0a15d5b 21ENTRY(startup)
1da177e4 22jiffies = jiffies_64;
1da177e4 23
ea29ee16
MS
24PHDRS {
25 text PT_LOAD FLAGS(5); /* R_E */
26 data PT_LOAD FLAGS(7); /* RWE */
27 note PT_NOTE FLAGS(0); /* ___ */
28}
29
1da177e4
LT
30SECTIONS
31{
e16af09d
SR
32 . = 0x00000000;
33 .text : {
d04a4c76 34 /* Text and read-only data */
2133bb8d 35 HEAD_TEXT
d04a4c76
HC
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;
2133bb8d 42 TEXT_TEXT
e16af09d 43 SCHED_TEXT
6727ad9e 44 CPUIDLE_TEXT
e16af09d
SR
45 LOCK_TEXT
46 KPROBES_TEXT
88dbd203 47 IRQENTRY_TEXT
be7635e7 48 SOFTIRQENTRY_TEXT
e16af09d
SR
49 *(.fixup)
50 *(.gnu.warning)
a817a61f 51 } :text = 0x0700
1da177e4 52
57d7f939 53 . = ALIGN(PAGE_SIZE);
e16af09d 54 _etext = .; /* End of text section */
1da177e4 55
ea29ee16 56 NOTES :text :note
ea29ee16 57
7a2512b7
MS
58 .dummy : { *(.dummy) } :data
59
56280b1b 60 RO_DATA_SECTION(PAGE_SIZE)
1da177e4
LT
61
62#ifdef CONFIG_SHARED_KERNEL
52480ee5 63 . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
162e006e 64#endif
1da177e4 65
52480ee5 66 . = ALIGN(PAGE_SIZE);
e16af09d 67 _eshared = .; /* End of shareable data */
dfcc3e6a 68 _sdata = .; /* Start of data section */
e16af09d 69
d07a980c
HC
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 = .;
e16af09d 78
04a95f6d 79 RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
e16af09d 80
e16af09d
SR
81 _edata = .; /* End of data section */
82
e16af09d 83 /* will be freed after init */
52480ee5 84 . = ALIGN(PAGE_SIZE); /* Init code and data */
e16af09d 85 __init_begin = .;
04a95f6d 86
57d7f939
MS
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 }
04a95f6d 94
e16af09d
SR
95 /*
96 * .exit.text is discarded at runtime, not link time,
97 * to deal with references from __bug_table
98 */
99 .exit.text : {
01ba2bdc 100 EXIT_TEXT
e16af09d
SR
101 }
102
a4e69245
HC
103 .exit.data : {
104 EXIT_DATA
105 }
106
92e6ecf3
CB
107 /* early.c uses stsi, which requires page aligned data. */
108 . = ALIGN(PAGE_SIZE);
04a95f6d 109 INIT_DATA_SECTION(0x100)
e16af09d 110
0415b00d 111 PERCPU_SECTION(0x100)
52480ee5 112 . = ALIGN(PAGE_SIZE);
e16af09d
SR
113 __init_end = .; /* freed after init ends here */
114
0ccb32c9 115 BSS_SECTION(PAGE_SIZE, 4 * PAGE_SIZE, PAGE_SIZE)
e16af09d
SR
116
117 _end = . ;
118
e16af09d
SR
119 /* Debugging sections. */
120 STABS_DEBUG
121 DWARF_DEBUG
023bf6f1
TH
122
123 /* Sections to be discarded */
124 DISCARDS
1da177e4 125}