aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorNelson Elhage <nelhage@ksplice.com>2009-09-11 04:28:44 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-09-11 04:29:48 -0400
commit04a95f6df9d7753098729ef1464e38552627af9d (patch)
treed6047ecc706157e71790ec197973177b6029b0d4 /arch/s390/kernel/vmlinux.lds.S
parent26803144666bd2155a19392fa58a7d512d9c0962 (diff)
[S390] clean up linker script using new linker script macros.
Note that this patch moves .data.init_task inside _edata. In addition, the alignment of .init.ramfs changes: It is now PAGE_ALIGNED and __initramfs_end is arbitrarily aligned; Previously it was only aligned to a 0x100-byte boundary, and always ended on an even byte. This change results in fewer output sections and in some data being reordered, but should have no functional effect. Signed-off-by: Nelson Elhage <nelhage@ksplice.com> Signed-off-by: Tim Abbott <tabbott@ksplice.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: linux-s390@vger.kernel.org Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/vmlinux.lds.S')
-rw-r--r--arch/s390/kernel/vmlinux.lds.S83
1 files changed, 7 insertions, 76 deletions
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 8e023c8c2461..7315f9e67e1d 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -52,51 +52,18 @@ SECTIONS
52 . = ALIGN(PAGE_SIZE); 52 . = ALIGN(PAGE_SIZE);
53 _eshared = .; /* End of shareable data */ 53 _eshared = .; /* End of shareable data */
54 54
55 . = ALIGN(16); /* Exception table */ 55 EXCEPTION_TABLE(16) :data
56 __ex_table : {
57 __start___ex_table = .;
58 *(__ex_table)
59 __stop___ex_table = .;
60 } :data
61
62 .data : { /* Data */
63 PAGE_ALIGNED_DATA(PAGE_SIZE)
64 DATA_DATA
65 CONSTRUCTORS
66 }
67
68 . = ALIGN(PAGE_SIZE);
69 .data_nosave : {
70 __nosave_begin = .;
71 *(.data.nosave)
72 }
73 . = ALIGN(PAGE_SIZE);
74 __nosave_end = .;
75 56
76 . = ALIGN(0x100); 57 RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
77 .data.cacheline_aligned : {
78 *(.data.cacheline_aligned)
79 }
80 58
81 . = ALIGN(0x100);
82 .data.read_mostly : {
83 *(.data.read_mostly)
84 }
85 _edata = .; /* End of data section */ 59 _edata = .; /* End of data section */
86 60
87 . = ALIGN(THREAD_SIZE); /* init_task */
88 .data.init_task : {
89 *(.data.init_task)
90 }
91
92 /* will be freed after init */ 61 /* will be freed after init */
93 . = ALIGN(PAGE_SIZE); /* Init code and data */ 62 . = ALIGN(PAGE_SIZE); /* Init code and data */
94 __init_begin = .; 63 __init_begin = .;
95 .init.text : { 64
96 _sinittext = .; 65 INIT_TEXT_SECTION(PAGE_SIZE)
97 INIT_TEXT 66
98 _einittext = .;
99 }
100 /* 67 /*
101 * .exit.text is discarded at runtime, not link time, 68 * .exit.text is discarded at runtime, not link time,
102 * to deal with references from __bug_table 69 * to deal with references from __bug_table
@@ -107,49 +74,13 @@ SECTIONS
107 74
108 /* early.c uses stsi, which requires page aligned data. */ 75 /* early.c uses stsi, which requires page aligned data. */
109 . = ALIGN(PAGE_SIZE); 76 . = ALIGN(PAGE_SIZE);
110 .init.data : { 77 INIT_DATA_SECTION(0x100)
111 INIT_DATA
112 }
113 . = ALIGN(0x100);
114 .init.setup : {
115 __setup_start = .;
116 *(.init.setup)
117 __setup_end = .;
118 }
119 .initcall.init : {
120 __initcall_start = .;
121 INITCALLS
122 __initcall_end = .;
123 }
124
125 .con_initcall.init : {
126 __con_initcall_start = .;
127 *(.con_initcall.init)
128 __con_initcall_end = .;
129 }
130 SECURITY_INIT
131
132#ifdef CONFIG_BLK_DEV_INITRD
133 . = ALIGN(0x100);
134 .init.ramfs : {
135 __initramfs_start = .;
136 *(.init.ramfs)
137 . = ALIGN(2);
138 __initramfs_end = .;
139 }
140#endif
141 78
142 PERCPU(PAGE_SIZE) 79 PERCPU(PAGE_SIZE)
143 . = ALIGN(PAGE_SIZE); 80 . = ALIGN(PAGE_SIZE);
144 __init_end = .; /* freed after init ends here */ 81 __init_end = .; /* freed after init ends here */
145 82
146 /* BSS */ 83 BSS_SECTION(0, 2, 0)
147 .bss : {
148 __bss_start = .;
149 *(.bss)
150 . = ALIGN(2);
151 __bss_stop = .;
152 }
153 84
154 _end = . ; 85 _end = . ;
155 86