aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2007-10-12 10:11:49 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-10-12 10:13:10 -0400
commite16af09d76ac3322e26f5b3ff49979691f350c12 (patch)
treeb54c57cefe5baa063aee5fdabcb348ab6f4ab06b /arch/s390
parent2b12f996c992334f65f6d9e0a3e731ec049fdad3 (diff)
[S390] s390: beautify vmlinux.lds
Introduce a consistent style in vmlinux.lds. This style is gradually being introduced for all archs. A few lables were moved inside the section definition so they are assigned the correct value of gcc decide to align the content to another address than the one . has. In the past this has fixed several bugs but for s390 it will not impact due to all the alignmnet already introduced. Stabs definitions are consolidated in asm-generic/vmlinux.lds.h This patch also introduce support for DWARF - without knowing if this makes sense for s390. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/vmlinux.lds.S233
1 files changed, 127 insertions, 106 deletions
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index b4622a3889b0..f6b16aec32e7 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -18,121 +18,142 @@ jiffies = jiffies_64;
18 18
19SECTIONS 19SECTIONS
20{ 20{
21 . = 0x00000000; 21 . = 0x00000000;
22 _text = .; /* Text and read-only data */ 22 .text : {
23 .text : { 23 _text = .; /* Text and read-only data */
24 *(.text.head) 24 *(.text.head)
25 TEXT_TEXT 25 TEXT_TEXT
26 SCHED_TEXT 26 SCHED_TEXT
27 LOCK_TEXT 27 LOCK_TEXT
28 KPROBES_TEXT 28 KPROBES_TEXT
29 *(.fixup) 29 *(.fixup)
30 *(.gnu.warning) 30 *(.gnu.warning)
31 } = 0x0700 31 } = 0x0700
32 32
33 _etext = .; /* End of text section */ 33 _etext = .; /* End of text section */
34 34
35 RODATA 35 RODATA
36 36
37#ifdef CONFIG_SHARED_KERNEL 37#ifdef CONFIG_SHARED_KERNEL
38 . = ALIGN(1048576); /* VM shared segments are 1MB aligned */ 38 . = ALIGN(1048576); /* VM shared segments are 1MB aligned */
39#endif 39#endif
40 40
41 . = ALIGN(4096); 41 . = ALIGN(4096);
42 _eshared = .; /* End of shareable data */ 42 _eshared = .; /* End of shareable data */
43 43
44 . = ALIGN(16); /* Exception table */ 44 . = ALIGN(16); /* Exception table */
45 __start___ex_table = .; 45 __ex_table : {
46 __ex_table : { *(__ex_table) } 46 __start___ex_table = .;
47 __stop___ex_table = .; 47 *(__ex_table)
48 48 __stop___ex_table = .;
49 NOTES 49 }
50 50
51 BUG_TABLE 51 NOTES
52 52 BUG_TABLE
53 .data : { /* Data */ 53
54 DATA_DATA 54 .data : { /* Data */
55 CONSTRUCTORS 55 DATA_DATA
56 } 56 CONSTRUCTORS
57 57 }
58 . = ALIGN(4096); 58
59 __nosave_begin = .; 59 . = ALIGN(4096);
60 .data_nosave : { *(.data.nosave) } 60 .data_nosave : {
61 . = ALIGN(4096); 61 __nosave_begin = .;
62 __nosave_end = .; 62 *(.data.nosave)
63 63 }
64 . = ALIGN(4096); 64 . = ALIGN(4096);
65 .data.page_aligned : { *(.data.idt) } 65 __nosave_end = .;
66 66
67 . = ALIGN(256); 67 . = ALIGN(4096);
68 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 68 .data.page_aligned : {
69 69 *(.data.idt)
70 . = ALIGN(256); 70 }
71 .data.read_mostly : { *(.data.read_mostly) } 71
72 _edata = .; /* End of data section */ 72 . = ALIGN(256);
73 73 .data.cacheline_aligned : {
74 . = ALIGN(8192); /* init_task */ 74 *(.data.cacheline_aligned)
75 .data.init_task : { *(.data.init_task) } 75 }
76 76
77 /* will be freed after init */ 77 . = ALIGN(256);
78 . = ALIGN(4096); /* Init code and data */ 78 .data.read_mostly : {
79 __init_begin = .; 79 *(.data.read_mostly)
80 .init.text : { 80 }
81 _sinittext = .; 81 _edata = .; /* End of data section */
82 *(.init.text) 82
83 _einittext = .; 83 . = ALIGN(8192); /* init_task */
84 } 84 .data.init_task : {
85 /* 85 *(.data.init_task)
86 * .exit.text is discarded at runtime, not link time, 86 }
87 * to deal with references from __bug_table 87
88 */ 88 /* will be freed after init */
89 .exit.text : { *(.exit.text) } 89 . = ALIGN(4096); /* Init code and data */
90 90 __init_begin = .;
91 .init.data : { *(.init.data) } 91 .init.text : {
92 . = ALIGN(256); 92 _sinittext = .;
93 __setup_start = .; 93 *(.init.text)
94 .init.setup : { *(.init.setup) } 94 _einittext = .;
95 __setup_end = .; 95 }
96 __initcall_start = .; 96 /*
97 .initcall.init : { 97 * .exit.text is discarded at runtime, not link time,
98 INITCALLS 98 * to deal with references from __bug_table
99 } 99 */
100 __initcall_end = .; 100 .exit.text : {
101 __con_initcall_start = .; 101 *(.exit.text)
102 .con_initcall.init : { *(.con_initcall.init) } 102 }
103 __con_initcall_end = .; 103
104 SECURITY_INIT 104 .init.data : {
105 *(.init.data)
106 }
107 . = ALIGN(256);
108 .init.setup : {
109 __setup_start = .;
110 *(.init.setup)
111 __setup_end = .;
112 }
113 .initcall.init : {
114 __initcall_start = .;
115 INITCALLS
116 __initcall_end = .;
117 }
118
119 .con_initcall.init : {
120 __con_initcall_start = .;
121 *(.con_initcall.init)
122 __con_initcall_end = .;
123 }
124 SECURITY_INIT
105 125
106#ifdef CONFIG_BLK_DEV_INITRD 126#ifdef CONFIG_BLK_DEV_INITRD
107 . = ALIGN(256); 127 . = ALIGN(256);
108 __initramfs_start = .; 128 .init.ramfs : {
109 .init.ramfs : { *(.init.initramfs) } 129 __initramfs_start = .;
110 . = ALIGN(2); 130 *(.init.ramfs)
111 __initramfs_end = .; 131 . = ALIGN(2);
132 __initramfs_end = .;
133 }
112#endif 134#endif
113 PERCPU(4096) 135
114 . = ALIGN(4096); 136 PERCPU(4096)
115 __init_end = .; 137 . = ALIGN(4096);
116 /* freed after init ends here */ 138 __init_end = .; /* freed after init ends here */
117 139
118 __bss_start = .; /* BSS */ 140 /* BSS */
119 .bss : { *(.bss) } 141 .bss : {
120 . = ALIGN(2); 142 __bss_start = .;
121 __bss_stop = .; 143 *(.bss)
122 144 . = ALIGN(2);
123 _end = . ; 145 __bss_stop = .;
124 146 }
125 /* Sections to be discarded */ 147
126 /DISCARD/ : { 148 _end = . ;
127 *(.exit.data) *(.exitcall.exit) 149
128 } 150 /* Sections to be discarded */
129 151 /DISCARD/ : {
130 /* Stabs debugging sections. */ 152 *(.exit.data)
131 .stab 0 : { *(.stab) } 153 *(.exitcall.exit)
132 .stabstr 0 : { *(.stabstr) } 154 }
133 .stab.excl 0 : { *(.stab.excl) } 155
134 .stab.exclstr 0 : { *(.stab.exclstr) } 156 /* Debugging sections. */
135 .stab.index 0 : { *(.stab.index) } 157 STABS_DEBUG
136 .stab.indexstr 0 : { *(.stab.indexstr) } 158 DWARF_DEBUG
137 .comment 0 : { *(.comment) }
138} 159}