]>
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 | |
347a8dc3 | 9 | #ifndef CONFIG_64BIT |
1da177e4 | 10 | OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") |
c985cb37 | 11 | OUTPUT_ARCH(s390:31-bit) |
e0a15d5b | 12 | ENTRY(startup) |
1da177e4 LT |
13 | jiffies = jiffies_64 + 4; |
14 | #else | |
15 | OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") | |
16 | OUTPUT_ARCH(s390:64-bit) | |
e0a15d5b | 17 | ENTRY(startup) |
1da177e4 LT |
18 | jiffies = jiffies_64; |
19 | #endif | |
20 | ||
ea29ee16 MS |
21 | PHDRS { |
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 |
27 | SECTIONS |
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 |
e16af09d SR |
38 | *(.fixup) |
39 | *(.gnu.warning) | |
a817a61f | 40 | } :text = 0x0700 |
1da177e4 | 41 | |
e16af09d | 42 | _etext = .; /* End of text section */ |
1da177e4 | 43 | |
ea29ee16 | 44 | NOTES :text :note |
ea29ee16 | 45 | |
7a2512b7 MS |
46 | .dummy : { *(.dummy) } :data |
47 | ||
56280b1b | 48 | RO_DATA_SECTION(PAGE_SIZE) |
1da177e4 LT |
49 | |
50 | #ifdef CONFIG_SHARED_KERNEL | |
52480ee5 | 51 | . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */ |
162e006e | 52 | #endif |
1da177e4 | 53 | |
52480ee5 | 54 | . = ALIGN(PAGE_SIZE); |
e16af09d | 55 | _eshared = .; /* End of shareable data */ |
dfcc3e6a | 56 | _sdata = .; /* Start of data section */ |
e16af09d | 57 | |
04a95f6d | 58 | EXCEPTION_TABLE(16) :data |
e16af09d | 59 | |
04a95f6d | 60 | RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE) |
e16af09d | 61 | |
e16af09d SR |
62 | _edata = .; /* End of data section */ |
63 | ||
e16af09d | 64 | /* will be freed after init */ |
52480ee5 | 65 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
e16af09d | 66 | __init_begin = .; |
04a95f6d NE |
67 | |
68 | INIT_TEXT_SECTION(PAGE_SIZE) | |
69 | ||
e16af09d SR |
70 | /* |
71 | * .exit.text is discarded at runtime, not link time, | |
72 | * to deal with references from __bug_table | |
73 | */ | |
74 | .exit.text : { | |
01ba2bdc | 75 | EXIT_TEXT |
e16af09d SR |
76 | } |
77 | ||
a4e69245 HC |
78 | .exit.data : { |
79 | EXIT_DATA | |
80 | } | |
81 | ||
92e6ecf3 CB |
82 | /* early.c uses stsi, which requires page aligned data. */ |
83 | . = ALIGN(PAGE_SIZE); | |
04a95f6d | 84 | INIT_DATA_SECTION(0x100) |
e16af09d | 85 | |
0415b00d | 86 | PERCPU_SECTION(0x100) |
52480ee5 | 87 | . = ALIGN(PAGE_SIZE); |
e16af09d SR |
88 | __init_end = .; /* freed after init ends here */ |
89 | ||
04a95f6d | 90 | BSS_SECTION(0, 2, 0) |
e16af09d SR |
91 | |
92 | _end = . ; | |
93 | ||
e16af09d SR |
94 | /* Debugging sections. */ |
95 | STABS_DEBUG | |
96 | DWARF_DEBUG | |
023bf6f1 TH |
97 | |
98 | /* Sections to be discarded */ | |
99 | DISCARDS | |
1da177e4 | 100 | } |