blob: 8fedb1f9fc976572c27f3863821e0ad60256021e [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* 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>
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
Martin Schwidefsky347a8dc2006-01-06 00:19:28 -08007#ifndef CONFIG_64BIT
Linus Torvalds1da177e2005-04-16 15:20:36 -07008OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
9OUTPUT_ARCH(s390)
10ENTRY(_start)
11jiffies = jiffies_64 + 4;
12#else
13OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
14OUTPUT_ARCH(s390:64-bit)
15ENTRY(_start)
16jiffies = jiffies_64;
17#endif
18
19SECTIONS
20{
21 . = 0x00000000;
22 _text = .; /* Text and read-only data */
23 .text : {
24 *(.text)
25 SCHED_TEXT
26 LOCK_TEXT
Michael Grundy4ba069b2006-09-20 15:58:39 +020027 KPROBES_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070028 *(.fixup)
29 *(.gnu.warning)
30 } = 0x0700
31
32 _etext = .; /* End of text section */
33
Linus Torvalds1da177e2005-04-16 15:20:36 -070034 RODATA
35
36#ifdef CONFIG_SHARED_KERNEL
37 . = ALIGN(1048576); /* VM shared segments are 1MB aligned */
38
39 _eshared = .; /* End of shareable data */
40#endif
41
Hongjie Yangfe355b72007-02-05 21:18:24 +010042 . = ALIGN(16); /* Exception table */
43 __start___ex_table = .;
44 __ex_table : { *(__ex_table) }
45 __stop___ex_table = .;
46
Linus Torvalds1da177e2005-04-16 15:20:36 -070047 .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
Christian Borntraeger58268b92006-04-27 18:40:24 -070061 . = ALIGN(256);
Linus Torvalds1da177e2005-04-16 15:20:36 -070062 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
63
Christian Borntraeger58268b92006-04-27 18:40:24 -070064 . = ALIGN(256);
65 .data.read_mostly : { *(.data.read_mostly) }
Linus Torvalds1da177e2005-04-16 15:20:36 -070066 _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 : {
Andrew Morton61ce1ef2006-10-27 11:41:44 -070086 INITCALLS
Linus Torvalds1da177e2005-04-16 15:20:36 -070087 }
88 __initcall_end = .;
89 __con_initcall_start = .;
90 .con_initcall.init : { *(.con_initcall.init) }
91 __con_initcall_end = .;
92 SECURITY_INIT
93 . = ALIGN(256);
94 __initramfs_start = .;
95 .init.ramfs : { *(.init.initramfs) }
96 . = ALIGN(2);
97 __initramfs_end = .;
98 . = ALIGN(256);
99 __per_cpu_start = .;
100 .data.percpu : { *(.data.percpu) }
101 __per_cpu_end = .;
102 . = ALIGN(4096);
103 __init_end = .;
104 /* freed after init ends here */
105
106 __bss_start = .; /* BSS */
107 .bss : { *(.bss) }
108 . = ALIGN(2);
109 __bss_stop = .;
110
111 _end = . ;
112
113 /* Sections to be discarded */
114 /DISCARD/ : {
Heiko Carstens1375fc12006-09-20 15:59:12 +0200115 *(.exit.text) *(.exit.data) *(.exitcall.exit)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116 }
117
118 /* Stabs debugging sections. */
119 .stab 0 : { *(.stab) }
120 .stabstr 0 : { *(.stabstr) }
121 .stab.excl 0 : { *(.stab.excl) }
122 .stab.exclstr 0 : { *(.stab.exclstr) }
123 .stab.index 0 : { *(.stab.index) }
124 .stab.indexstr 0 : { *(.stab.indexstr) }
125 .comment 0 : { *(.comment) }
126}