]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - arch/s390/kernel/vmlinux.lds.S
vmlinux.lds.h: allow arch specific handling of ro_after_init data section
[mirror_ubuntu-focal-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
1da177e4 14#include <asm-generic/vmlinux.lds.h>
1da177e4 15
1da177e4
LT
16OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
17OUTPUT_ARCH(s390:64-bit)
e0a15d5b 18ENTRY(startup)
1da177e4 19jiffies = jiffies_64;
1da177e4 20
ea29ee16
MS
21PHDRS {
22 text PT_LOAD FLAGS(5); /* R_E */
23 data PT_LOAD FLAGS(7); /* RWE */
24 note PT_NOTE FLAGS(0); /* ___ */
25}
26
1da177e4
LT
27SECTIONS
28{
e16af09d
SR
29 . = 0x00000000;
30 .text : {
31 _text = .; /* Text and read-only data */
2133bb8d
TA
32 HEAD_TEXT
33 TEXT_TEXT
e16af09d
SR
34 SCHED_TEXT
35 LOCK_TEXT
36 KPROBES_TEXT
88dbd203 37 IRQENTRY_TEXT
be7635e7 38 SOFTIRQENTRY_TEXT
e16af09d
SR
39 *(.fixup)
40 *(.gnu.warning)
a817a61f 41 } :text = 0x0700
1da177e4 42
e16af09d 43 _etext = .; /* End of text section */
1da177e4 44
ea29ee16 45 NOTES :text :note
ea29ee16 46
7a2512b7
MS
47 .dummy : { *(.dummy) } :data
48
56280b1b 49 RO_DATA_SECTION(PAGE_SIZE)
1da177e4
LT
50
51#ifdef CONFIG_SHARED_KERNEL
52480ee5 52 . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
162e006e 53#endif
1da177e4 54
52480ee5 55 . = ALIGN(PAGE_SIZE);
e16af09d 56 _eshared = .; /* End of shareable data */
dfcc3e6a 57 _sdata = .; /* Start of data section */
e16af09d 58
04a95f6d 59 EXCEPTION_TABLE(16) :data
e16af09d 60
04a95f6d 61 RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
e16af09d 62
e16af09d
SR
63 _edata = .; /* End of data section */
64
e16af09d 65 /* will be freed after init */
52480ee5 66 . = ALIGN(PAGE_SIZE); /* Init code and data */
e16af09d 67 __init_begin = .;
04a95f6d
NE
68
69 INIT_TEXT_SECTION(PAGE_SIZE)
70
e16af09d
SR
71 /*
72 * .exit.text is discarded at runtime, not link time,
73 * to deal with references from __bug_table
74 */
75 .exit.text : {
01ba2bdc 76 EXIT_TEXT
e16af09d
SR
77 }
78
a4e69245
HC
79 .exit.data : {
80 EXIT_DATA
81 }
82
92e6ecf3
CB
83 /* early.c uses stsi, which requires page aligned data. */
84 . = ALIGN(PAGE_SIZE);
04a95f6d 85 INIT_DATA_SECTION(0x100)
e16af09d 86
0415b00d 87 PERCPU_SECTION(0x100)
52480ee5 88 . = ALIGN(PAGE_SIZE);
e16af09d
SR
89 __init_end = .; /* freed after init ends here */
90
0ccb32c9 91 BSS_SECTION(PAGE_SIZE, 4 * PAGE_SIZE, PAGE_SIZE)
e16af09d
SR
92
93 _end = . ;
94
e16af09d
SR
95 /* Debugging sections. */
96 STABS_DEBUG
97 DWARF_DEBUG
023bf6f1
TH
98
99 /* Sections to be discarded */
100 DISCARDS
1da177e4 101}