Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* ld script to make s390 Linux kernel |
2 | * Written by Martin Schwidefsky (schwidefsky@de.ibm.com) | |
3 | */ | |
4 | ||
5 | #include <asm-generic/vmlinux.lds.h> | |
1da177e4 | 6 | |
347a8dc3 | 7 | #ifndef CONFIG_64BIT |
1da177e4 LT |
8 | OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") |
9 | OUTPUT_ARCH(s390) | |
10 | ENTRY(_start) | |
11 | jiffies = jiffies_64 + 4; | |
12 | #else | |
13 | OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") | |
14 | OUTPUT_ARCH(s390:64-bit) | |
15 | ENTRY(_start) | |
16 | jiffies = jiffies_64; | |
17 | #endif | |
18 | ||
19 | SECTIONS | |
20 | { | |
21 | . = 0x00000000; | |
22 | _text = .; /* Text and read-only data */ | |
23 | .text : { | |
24 | *(.text) | |
25 | SCHED_TEXT | |
26 | LOCK_TEXT | |
4ba069b8 | 27 | KPROBES_TEXT |
1da177e4 LT |
28 | *(.fixup) |
29 | *(.gnu.warning) | |
30 | } = 0x0700 | |
31 | ||
32 | _etext = .; /* End of text section */ | |
33 | ||
34 | . = ALIGN(16); /* Exception table */ | |
35 | __start___ex_table = .; | |
36 | __ex_table : { *(__ex_table) } | |
37 | __stop___ex_table = .; | |
38 | ||
39 | RODATA | |
40 | ||
41 | #ifdef CONFIG_SHARED_KERNEL | |
42 | . = ALIGN(1048576); /* VM shared segments are 1MB aligned */ | |
43 | ||
44 | _eshared = .; /* End of shareable data */ | |
45 | #endif | |
46 | ||
47 | .data : { /* Data */ | |
48 | *(.data) | |
49 | CONSTRUCTORS | |
50 | } | |
51 | ||
52 | . = ALIGN(4096); | |
53 | __nosave_begin = .; | |
54 | .data_nosave : { *(.data.nosave) } | |
55 | . = ALIGN(4096); | |
56 | __nosave_end = .; | |
57 | ||
58 | . = ALIGN(4096); | |
59 | .data.page_aligned : { *(.data.idt) } | |
60 | ||
58268b97 | 61 | . = ALIGN(256); |
1da177e4 LT |
62 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } |
63 | ||
58268b97 CB |
64 | . = ALIGN(256); |
65 | .data.read_mostly : { *(.data.read_mostly) } | |
1da177e4 LT |
66 | _edata = .; /* End of data section */ |
67 | ||
68 | . = ALIGN(8192); /* init_task */ | |
69 | .data.init_task : { *(.data.init_task) } | |
70 | ||
71 | /* will be freed after init */ | |
72 | . = ALIGN(4096); /* Init code and data */ | |
73 | __init_begin = .; | |
74 | .init.text : { | |
75 | _sinittext = .; | |
76 | *(.init.text) | |
77 | _einittext = .; | |
78 | } | |
79 | .init.data : { *(.init.data) } | |
80 | . = ALIGN(256); | |
81 | __setup_start = .; | |
82 | .init.setup : { *(.init.setup) } | |
83 | __setup_end = .; | |
84 | __initcall_start = .; | |
85 | .initcall.init : { | |
86 | *(.initcall1.init) | |
87 | *(.initcall2.init) | |
88 | *(.initcall3.init) | |
89 | *(.initcall4.init) | |
90 | *(.initcall5.init) | |
91 | *(.initcall6.init) | |
92 | *(.initcall7.init) | |
93 | } | |
94 | __initcall_end = .; | |
95 | __con_initcall_start = .; | |
96 | .con_initcall.init : { *(.con_initcall.init) } | |
97 | __con_initcall_end = .; | |
98 | SECURITY_INIT | |
99 | . = ALIGN(256); | |
100 | __initramfs_start = .; | |
101 | .init.ramfs : { *(.init.initramfs) } | |
102 | . = ALIGN(2); | |
103 | __initramfs_end = .; | |
104 | . = ALIGN(256); | |
105 | __per_cpu_start = .; | |
106 | .data.percpu : { *(.data.percpu) } | |
107 | __per_cpu_end = .; | |
108 | . = ALIGN(4096); | |
109 | __init_end = .; | |
110 | /* freed after init ends here */ | |
111 | ||
112 | __bss_start = .; /* BSS */ | |
113 | .bss : { *(.bss) } | |
114 | . = ALIGN(2); | |
115 | __bss_stop = .; | |
116 | ||
117 | _end = . ; | |
118 | ||
119 | /* Sections to be discarded */ | |
120 | /DISCARD/ : { | |
1375fc1f | 121 | *(.exit.text) *(.exit.data) *(.exitcall.exit) |
1da177e4 LT |
122 | } |
123 | ||
124 | /* Stabs debugging sections. */ | |
125 | .stab 0 : { *(.stab) } | |
126 | .stabstr 0 : { *(.stabstr) } | |
127 | .stab.excl 0 : { *(.stab.excl) } | |
128 | .stab.exclstr 0 : { *(.stab.exclstr) } | |
129 | .stab.index 0 : { *(.stab.index) } | |
130 | .stab.indexstr 0 : { *(.stab.indexstr) } | |
131 | .comment 0 : { *(.comment) } | |
132 | } |