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