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