aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJean-Paul Saman <jean-paul.saman@nxp.com>2007-02-10 04:44:44 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:25 -0500
commit67d38229dfa64cf9a75f83746dde345f47bbd8dc (patch)
tree36ecb1005e79616e4d1274e1c0ebf793125aeb38 /arch
parentc33df4eaaf41fd3e34837a6ae9a5f9970c393d9f (diff)
[PATCH] disable init/initramfs.c: architectures
Update all arch/*/kernel/vmlinux.lds.S to not include space for initramfs when CONFIG_BLK_DEV_INITRAMFS is not selected. This saves another 4 kbytes on most platfoms (some reserve PAGE_SIZE for initramfs). Signed-off-by: Jean-Paul Saman <jean-paul.saman@nxp.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/vmlinux.lds.S2
-rw-r--r--arch/arm/kernel/vmlinux.lds.S2
-rw-r--r--arch/arm26/kernel/vmlinux-arm26-xip.lds.in2
-rw-r--r--arch/arm26/kernel/vmlinux-arm26.lds.in2
-rw-r--r--arch/avr32/kernel/vmlinux.lds.c2
-rw-r--r--arch/cris/arch-v10/vmlinux.lds.S4
-rw-r--r--arch/cris/arch-v32/vmlinux.lds.S2
-rw-r--r--arch/frv/kernel/vmlinux.lds.S2
-rw-r--r--arch/h8300/kernel/vmlinux.lds.S2
-rw-r--r--arch/i386/kernel/vmlinux.lds.S2
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S2
-rw-r--r--arch/m32r/kernel/vmlinux.lds.S4
-rw-r--r--arch/m68k/kernel/vmlinux-std.lds2
-rw-r--r--arch/m68k/kernel/vmlinux-sun3.lds2
-rw-r--r--arch/m68knommu/kernel/vmlinux.lds.S2
-rw-r--r--arch/mips/kernel/vmlinux.lds.S2
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S2
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S4
-rw-r--r--arch/ppc/kernel/vmlinux.lds.S2
-rw-r--r--arch/s390/kernel/vmlinux.lds.S3
-rw-r--r--arch/sh/kernel/vmlinux.lds.S4
-rw-r--r--arch/sh64/kernel/vmlinux.lds.S4
-rw-r--r--arch/sparc/kernel/vmlinux.lds.S4
-rw-r--r--arch/sparc64/kernel/vmlinux.lds.S4
-rw-r--r--arch/v850/kernel/vmlinux.lds.S4
-rw-r--r--arch/x86_64/kernel/vmlinux.lds.S4
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S2
27 files changed, 70 insertions, 3 deletions
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 76bf071e376c..4cc44bd33d33 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -52,10 +52,12 @@ SECTIONS
52 } 52 }
53 __initcall_end = .; 53 __initcall_end = .;
54 54
55#ifdef CONFIG_BLK_DEV_INITRD
55 . = ALIGN(8192); 56 . = ALIGN(8192);
56 __initramfs_start = .; 57 __initramfs_start = .;
57 .init.ramfs : { *(.init.ramfs) } 58 .init.ramfs : { *(.init.ramfs) }
58 __initramfs_end = .; 59 __initramfs_end = .;
60#endif
59 61
60 . = ALIGN(8); 62 . = ALIGN(8);
61 .con_initcall.init : { 63 .con_initcall.init : {
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index a8fa75ea07a9..b929a60f7547 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -53,10 +53,12 @@ SECTIONS
53 __security_initcall_start = .; 53 __security_initcall_start = .;
54 *(.security_initcall.init) 54 *(.security_initcall.init)
55 __security_initcall_end = .; 55 __security_initcall_end = .;
56#ifdef CONFIG_BLK_DEV_INITRD
56 . = ALIGN(32); 57 . = ALIGN(32);
57 __initramfs_start = .; 58 __initramfs_start = .;
58 usr/built-in.o(.init.ramfs) 59 usr/built-in.o(.init.ramfs)
59 __initramfs_end = .; 60 __initramfs_end = .;
61#endif
60 . = ALIGN(64); 62 . = ALIGN(64);
61 __per_cpu_start = .; 63 __per_cpu_start = .;
62 *(.data.percpu) 64 *(.data.percpu)
diff --git a/arch/arm26/kernel/vmlinux-arm26-xip.lds.in b/arch/arm26/kernel/vmlinux-arm26-xip.lds.in
index ca61ec8218fe..046a85054018 100644
--- a/arch/arm26/kernel/vmlinux-arm26-xip.lds.in
+++ b/arch/arm26/kernel/vmlinux-arm26-xip.lds.in
@@ -46,10 +46,12 @@ SECTIONS
46 __con_initcall_start = .; 46 __con_initcall_start = .;
47 *(.con_initcall.init) 47 *(.con_initcall.init)
48 __con_initcall_end = .; 48 __con_initcall_end = .;
49#ifdef CONFIG_BLK_DEV_INITRD
49 . = ALIGN(32); 50 . = ALIGN(32);
50 __initramfs_start = .; 51 __initramfs_start = .;
51 usr/built-in.o(.init.ramfs) 52 usr/built-in.o(.init.ramfs)
52 __initramfs_end = .; 53 __initramfs_end = .;
54#endif
53 . = ALIGN(32768); 55 . = ALIGN(32768);
54 __init_end = .; 56 __init_end = .;
55 } 57 }
diff --git a/arch/arm26/kernel/vmlinux-arm26.lds.in b/arch/arm26/kernel/vmlinux-arm26.lds.in
index d1d3418d7eb6..1d2949e83be8 100644
--- a/arch/arm26/kernel/vmlinux-arm26.lds.in
+++ b/arch/arm26/kernel/vmlinux-arm26.lds.in
@@ -47,10 +47,12 @@ SECTIONS
47 __con_initcall_start = .; 47 __con_initcall_start = .;
48 *(.con_initcall.init) 48 *(.con_initcall.init)
49 __con_initcall_end = .; 49 __con_initcall_end = .;
50#ifdef CONFIG_BLK_DEV_INITRD
50 . = ALIGN(32); 51 . = ALIGN(32);
51 __initramfs_start = .; 52 __initramfs_start = .;
52 usr/built-in.o(.init.ramfs) 53 usr/built-in.o(.init.ramfs)
53 __initramfs_end = .; 54 __initramfs_end = .;
55#endif
54 . = ALIGN(32768); 56 . = ALIGN(32768);
55 __init_end = .; 57 __init_end = .;
56 } 58 }
diff --git a/arch/avr32/kernel/vmlinux.lds.c b/arch/avr32/kernel/vmlinux.lds.c
index 5c4424e362b5..ef13b7c78935 100644
--- a/arch/avr32/kernel/vmlinux.lds.c
+++ b/arch/avr32/kernel/vmlinux.lds.c
@@ -46,10 +46,12 @@ SECTIONS
46 __security_initcall_start = .; 46 __security_initcall_start = .;
47 *(.security_initcall.init) 47 *(.security_initcall.init)
48 __security_initcall_end = .; 48 __security_initcall_end = .;
49#ifdef CONFIG_BLK_DEV_INITRD
49 . = ALIGN(32); 50 . = ALIGN(32);
50 __initramfs_start = .; 51 __initramfs_start = .;
51 *(.init.ramfs) 52 *(.init.ramfs)
52 __initramfs_end = .; 53 __initramfs_end = .;
54#endif
53 . = ALIGN(4096); 55 . = ALIGN(4096);
54 __init_end = .; 56 __init_end = .;
55 } 57 }
diff --git a/arch/cris/arch-v10/vmlinux.lds.S b/arch/cris/arch-v10/vmlinux.lds.S
index 689729a7e66e..4b348b38cf33 100644
--- a/arch/cris/arch-v10/vmlinux.lds.S
+++ b/arch/cris/arch-v10/vmlinux.lds.S
@@ -82,7 +82,8 @@ SECTIONS
82 __con_initcall_end = .; 82 __con_initcall_end = .;
83 } 83 }
84 SECURITY_INIT 84 SECURITY_INIT
85 85
86#ifdef CONFIG_BLK_DEV_INITRD
86 .init.ramfs : { 87 .init.ramfs : {
87 __initramfs_start = .; 88 __initramfs_start = .;
88 *(.init.ramfs) 89 *(.init.ramfs)
@@ -93,6 +94,7 @@ SECTIONS
93 FILL (0); 94 FILL (0);
94 . = ALIGN (8192); 95 . = ALIGN (8192);
95 } 96 }
97#endif
96 98
97 __vmlinux_end = .; /* last address of the physical file */ 99 __vmlinux_end = .; /* last address of the physical file */
98 __init_end = .; 100 __init_end = .;
diff --git a/arch/cris/arch-v32/vmlinux.lds.S b/arch/cris/arch-v32/vmlinux.lds.S
index 472d4b3c4cf4..e124fcd766d5 100644
--- a/arch/cris/arch-v32/vmlinux.lds.S
+++ b/arch/cris/arch-v32/vmlinux.lds.S
@@ -95,6 +95,7 @@ SECTIONS
95 .data.percpu : { *(.data.percpu) } 95 .data.percpu : { *(.data.percpu) }
96 __per_cpu_end = .; 96 __per_cpu_end = .;
97 97
98#ifdef CONFIG_BLK_DEV_INITRD
98 .init.ramfs : { 99 .init.ramfs : {
99 __initramfs_start = .; 100 __initramfs_start = .;
100 *(.init.ramfs) 101 *(.init.ramfs)
@@ -107,6 +108,7 @@ SECTIONS
107 FILL (0); 108 FILL (0);
108 . = ALIGN (8192); 109 . = ALIGN (8192);
109 } 110 }
111#endif
110 112
111 __vmlinux_end = .; /* Last address of the physical file. */ 113 __vmlinux_end = .; /* Last address of the physical file. */
112 __init_end = .; 114 __init_end = .;
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S
index 9c1fb12367fa..97910e016825 100644
--- a/arch/frv/kernel/vmlinux.lds.S
+++ b/arch/frv/kernel/vmlinux.lds.S
@@ -61,10 +61,12 @@ SECTIONS
61 .data.percpu : { *(.data.percpu) } 61 .data.percpu : { *(.data.percpu) }
62 __per_cpu_end = .; 62 __per_cpu_end = .;
63 63
64#ifdef CONFIG_BLK_DEV_INITRD
64 . = ALIGN(4096); 65 . = ALIGN(4096);
65 __initramfs_start = .; 66 __initramfs_start = .;
66 .init.ramfs : { *(.init.ramfs) } 67 .init.ramfs : { *(.init.ramfs) }
67 __initramfs_end = .; 68 __initramfs_end = .;
69#endif
68 70
69 . = ALIGN(THREAD_SIZE); 71 . = ALIGN(THREAD_SIZE);
70 __init_end = .; 72 __init_end = .;
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S
index f05288be8878..65f1cdc5ee04 100644
--- a/arch/h8300/kernel/vmlinux.lds.S
+++ b/arch/h8300/kernel/vmlinux.lds.S
@@ -126,10 +126,12 @@ SECTIONS
126 ___con_initcall_end = .; 126 ___con_initcall_end = .;
127 *(.exit.text) 127 *(.exit.text)
128 *(.exit.data) 128 *(.exit.data)
129#if defined(CONFIG_BLK_DEV_INITRD)
129 . = ALIGN(4); 130 . = ALIGN(4);
130 ___initramfs_start = .; 131 ___initramfs_start = .;
131 *(.init.ramfs) 132 *(.init.ramfs)
132 ___initramfs_end = .; 133 ___initramfs_end = .;
134#endif
133 . = ALIGN(0x4) ; 135 . = ALIGN(0x4) ;
134 ___init_end = .; 136 ___init_end = .;
135 __edata = . ; 137 __edata = . ;
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S
index a53c8b1854b5..5038a73d554e 100644
--- a/arch/i386/kernel/vmlinux.lds.S
+++ b/arch/i386/kernel/vmlinux.lds.S
@@ -181,12 +181,14 @@ SECTIONS
181 from .altinstructions and .eh_frame */ 181 from .altinstructions and .eh_frame */
182 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } 182 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
183 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } 183 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
184#if defined(CONFIG_BLK_DEV_INITRD)
184 . = ALIGN(4096); 185 . = ALIGN(4096);
185 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { 186 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
186 __initramfs_start = .; 187 __initramfs_start = .;
187 *(.init.ramfs) 188 *(.init.ramfs)
188 __initramfs_end = .; 189 __initramfs_end = .;
189 } 190 }
191#endif
190 . = ALIGN(L1_CACHE_BYTES); 192 . = ALIGN(L1_CACHE_BYTES);
191 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { 193 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) {
192 __per_cpu_start = .; 194 __per_cpu_start = .;
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 8f3d0066f446..25dd55e4db24 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -111,12 +111,14 @@ SECTIONS
111 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) 111 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET)
112 { *(.init.data) } 112 { *(.init.data) }
113 113
114#ifdef CONFIG_BLK_DEV_INITRD
114 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) 115 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET)
115 { 116 {
116 __initramfs_start = .; 117 __initramfs_start = .;
117 *(.init.ramfs) 118 *(.init.ramfs)
118 __initramfs_end = .; 119 __initramfs_end = .;
119 } 120 }
121#endif
120 122
121 . = ALIGN(16); 123 . = ALIGN(16);
122 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) 124 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET)
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S
index c497a2fc88ed..439cc257cd1d 100644
--- a/arch/m32r/kernel/vmlinux.lds.S
+++ b/arch/m32r/kernel/vmlinux.lds.S
@@ -102,10 +102,14 @@ SECTIONS
102 from .altinstructions and .eh_frame */ 102 from .altinstructions and .eh_frame */
103 .exit.text : { *(.exit.text) } 103 .exit.text : { *(.exit.text) }
104 .exit.data : { *(.exit.data) } 104 .exit.data : { *(.exit.data) }
105
106#ifdef CONFIG_BLK_DEV_INITRD
105 . = ALIGN(4096); 107 . = ALIGN(4096);
106 __initramfs_start = .; 108 __initramfs_start = .;
107 .init.ramfs : { *(.init.ramfs) } 109 .init.ramfs : { *(.init.ramfs) }
108 __initramfs_end = .; 110 __initramfs_end = .;
111#endif
112
109 . = ALIGN(32); 113 . = ALIGN(32);
110 __per_cpu_start = .; 114 __per_cpu_start = .;
111 .data.percpu : { *(.data.percpu) } 115 .data.percpu : { *(.data.percpu) }
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds
index d2794452b195..437b4f8d86c5 100644
--- a/arch/m68k/kernel/vmlinux-std.lds
+++ b/arch/m68k/kernel/vmlinux-std.lds
@@ -61,10 +61,12 @@ SECTIONS
61 .con_initcall.init : { *(.con_initcall.init) } 61 .con_initcall.init : { *(.con_initcall.init) }
62 __con_initcall_end = .; 62 __con_initcall_end = .;
63 SECURITY_INIT 63 SECURITY_INIT
64#ifdef CONFIG_BLK_DEV_INITRD
64 . = ALIGN(8192); 65 . = ALIGN(8192);
65 __initramfs_start = .; 66 __initramfs_start = .;
66 .init.ramfs : { *(.init.ramfs) } 67 .init.ramfs : { *(.init.ramfs) }
67 __initramfs_end = .; 68 __initramfs_end = .;
69#endif
68 . = ALIGN(8192); 70 . = ALIGN(8192);
69 __init_end = .; 71 __init_end = .;
70 72
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds
index 8c7eccbfc982..2868e206fc76 100644
--- a/arch/m68k/kernel/vmlinux-sun3.lds
+++ b/arch/m68k/kernel/vmlinux-sun3.lds
@@ -55,10 +55,12 @@ __init_begin = .;
55 .con_initcall.init : { *(.con_initcall.init) } 55 .con_initcall.init : { *(.con_initcall.init) }
56 __con_initcall_end = .; 56 __con_initcall_end = .;
57 SECURITY_INIT 57 SECURITY_INIT
58#ifdef CONFIG_BLK_DEV_INITRD
58 . = ALIGN(8192); 59 . = ALIGN(8192);
59 __initramfs_start = .; 60 __initramfs_start = .;
60 .init.ramfs : { *(.init.ramfs) } 61 .init.ramfs : { *(.init.ramfs) }
61 __initramfs_end = .; 62 __initramfs_end = .;
63#endif
62 . = ALIGN(8192); 64 . = ALIGN(8192);
63 __init_end = .; 65 __init_end = .;
64 .data.init.task : { *(.data.init_task) } 66 .data.init.task : { *(.data.init_task) }
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index bfade20a9e5e..c86a1bf589d4 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -159,10 +159,12 @@ SECTIONS {
159 __security_initcall_start = .; 159 __security_initcall_start = .;
160 *(.security_initcall.init) 160 *(.security_initcall.init)
161 __security_initcall_end = .; 161 __security_initcall_end = .;
162#ifdef CONFIG_BLK_DEV_INITRD
162 . = ALIGN(4); 163 . = ALIGN(4);
163 __initramfs_start = .; 164 __initramfs_start = .;
164 *(.init.ramfs) 165 *(.init.ramfs)
165 __initramfs_end = .; 166 __initramfs_end = .;
167#endif
166 . = ALIGN(4096); 168 . = ALIGN(4096);
167 __init_end = .; 169 __init_end = .;
168 } > INIT 170 } > INIT
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index cecff24cc972..c76b793310c2 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -113,10 +113,12 @@ SECTIONS
113 references from .rodata */ 113 references from .rodata */
114 .exit.text : { *(.exit.text) } 114 .exit.text : { *(.exit.text) }
115 .exit.data : { *(.exit.data) } 115 .exit.data : { *(.exit.data) }
116#if defined(CONFIG_BLK_DEV_INITRD)
116 . = ALIGN(_PAGE_SIZE); 117 . = ALIGN(_PAGE_SIZE);
117 __initramfs_start = .; 118 __initramfs_start = .;
118 .init.ramfs : { *(.init.ramfs) } 119 .init.ramfs : { *(.init.ramfs) }
119 __initramfs_end = .; 120 __initramfs_end = .;
121#endif
120 . = ALIGN(32); 122 . = ALIGN(32);
121 __per_cpu_start = .; 123 __per_cpu_start = .;
122 .data.percpu : { *(.data.percpu) } 124 .data.percpu : { *(.data.percpu) }
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index 7b943b45f7cd..3b78c2794c36 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -173,10 +173,12 @@ SECTIONS
173 from .altinstructions and .eh_frame */ 173 from .altinstructions and .eh_frame */
174 .exit.text : { *(.exit.text) } 174 .exit.text : { *(.exit.text) }
175 .exit.data : { *(.exit.data) } 175 .exit.data : { *(.exit.data) }
176#ifdef CONFIG_BLK_DEV_INITRD
176 . = ALIGN(ASM_PAGE_SIZE); 177 . = ALIGN(ASM_PAGE_SIZE);
177 __initramfs_start = .; 178 __initramfs_start = .;
178 .init.ramfs : { *(.init.ramfs) } 179 .init.ramfs : { *(.init.ramfs) }
179 __initramfs_end = .; 180 __initramfs_end = .;
181#endif
180 . = ALIGN(32); 182 . = ALIGN(32);
181 __per_cpu_start = .; 183 __per_cpu_start = .;
182 .data.percpu : { *(.data.percpu) } 184 .data.percpu : { *(.data.percpu) }
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 04b8e71bf5b0..7eefeb4a30e7 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -131,14 +131,14 @@ SECTIONS
131 __stop___fw_ftr_fixup = .; 131 __stop___fw_ftr_fixup = .;
132 } 132 }
133#endif 133#endif
134 134#ifdef CONFIG_BLK_DEV_INITRD
135 . = ALIGN(PAGE_SIZE); 135 . = ALIGN(PAGE_SIZE);
136 .init.ramfs : { 136 .init.ramfs : {
137 __initramfs_start = .; 137 __initramfs_start = .;
138 *(.init.ramfs) 138 *(.init.ramfs)
139 __initramfs_end = .; 139 __initramfs_end = .;
140 } 140 }
141 141#endif
142#ifdef CONFIG_PPC32 142#ifdef CONFIG_PPC32
143 . = ALIGN(32); 143 . = ALIGN(32);
144#else 144#else
diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S
index 61921268a0d0..a0625562a44b 100644
--- a/arch/ppc/kernel/vmlinux.lds.S
+++ b/arch/ppc/kernel/vmlinux.lds.S
@@ -135,10 +135,12 @@ SECTIONS
135 .data.percpu : { *(.data.percpu) } 135 .data.percpu : { *(.data.percpu) }
136 __per_cpu_end = .; 136 __per_cpu_end = .;
137 137
138#ifdef CONFIG_BLK_DEV_INITRD
138 . = ALIGN(4096); 139 . = ALIGN(4096);
139 __initramfs_start = .; 140 __initramfs_start = .;
140 .init.ramfs : { *(.init.ramfs) } 141 .init.ramfs : { *(.init.ramfs) }
141 __initramfs_end = .; 142 __initramfs_end = .;
143#endif
142 144
143 . = ALIGN(4096); 145 . = ALIGN(4096);
144 __init_end = .; 146 __init_end = .;
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index a48907392522..c30716ae130c 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -91,11 +91,14 @@ SECTIONS
91 .con_initcall.init : { *(.con_initcall.init) } 91 .con_initcall.init : { *(.con_initcall.init) }
92 __con_initcall_end = .; 92 __con_initcall_end = .;
93 SECURITY_INIT 93 SECURITY_INIT
94
95#ifdef CONFIG_BLK_DEV_INITRD
94 . = ALIGN(256); 96 . = ALIGN(256);
95 __initramfs_start = .; 97 __initramfs_start = .;
96 .init.ramfs : { *(.init.initramfs) } 98 .init.ramfs : { *(.init.initramfs) }
97 . = ALIGN(2); 99 . = ALIGN(2);
98 __initramfs_end = .; 100 __initramfs_end = .;
101#endif
99 . = ALIGN(256); 102 . = ALIGN(256);
100 __per_cpu_start = .; 103 __per_cpu_start = .;
101 .data.percpu : { *(.data.percpu) } 104 .data.percpu : { *(.data.percpu) }
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index f34bdcc33a7d..75de165867a0 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -83,9 +83,13 @@ SECTIONS
83 .con_initcall.init : { *(.con_initcall.init) } 83 .con_initcall.init : { *(.con_initcall.init) }
84 __con_initcall_end = .; 84 __con_initcall_end = .;
85 SECURITY_INIT 85 SECURITY_INIT
86
87#ifdef CONFIG_BLK_DEV_INITRD
86 __initramfs_start = .; 88 __initramfs_start = .;
87 .init.ramfs : { *(.init.ramfs) } 89 .init.ramfs : { *(.init.ramfs) }
88 __initramfs_end = .; 90 __initramfs_end = .;
91#endif
92
89 __machvec_start = .; 93 __machvec_start = .;
90 .init.machvec : { *(.init.machvec) } 94 .init.machvec : { *(.init.machvec) }
91 __machvec_end = .; 95 __machvec_end = .;
diff --git a/arch/sh64/kernel/vmlinux.lds.S b/arch/sh64/kernel/vmlinux.lds.S
index 95c4d753e357..a59c5e998131 100644
--- a/arch/sh64/kernel/vmlinux.lds.S
+++ b/arch/sh64/kernel/vmlinux.lds.S
@@ -115,9 +115,13 @@ SECTIONS
115 .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) } 115 .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) }
116 __con_initcall_end = .; 116 __con_initcall_end = .;
117 SECURITY_INIT 117 SECURITY_INIT
118
119#ifdef CONFIG_BLK_DEV_INITRD
118 __initramfs_start = .; 120 __initramfs_start = .;
119 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) } 121 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
120 __initramfs_end = .; 122 __initramfs_end = .;
123#endif
124
121 . = ALIGN(PAGE_SIZE); 125 . = ALIGN(PAGE_SIZE);
122 __init_end = .; 126 __init_end = .;
123 127
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index b73e6b9067ed..e5c24e0521de 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -57,10 +57,14 @@ SECTIONS
57 .con_initcall.init : { *(.con_initcall.init) } 57 .con_initcall.init : { *(.con_initcall.init) }
58 __con_initcall_end = .; 58 __con_initcall_end = .;
59 SECURITY_INIT 59 SECURITY_INIT
60
61#ifdef CONFIG_BLK_DEV_INITRD
60 . = ALIGN(4096); 62 . = ALIGN(4096);
61 __initramfs_start = .; 63 __initramfs_start = .;
62 .init.ramfs : { *(.init.ramfs) } 64 .init.ramfs : { *(.init.ramfs) }
63 __initramfs_end = .; 65 __initramfs_end = .;
66#endif
67
64 . = ALIGN(32); 68 . = ALIGN(32);
65 __per_cpu_start = .; 69 __per_cpu_start = .;
66 .data.percpu : { *(.data.percpu) } 70 .data.percpu : { *(.data.percpu) }
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S
index 4a6063f33e7a..13fa2a2e4513 100644
--- a/arch/sparc64/kernel/vmlinux.lds.S
+++ b/arch/sparc64/kernel/vmlinux.lds.S
@@ -81,10 +81,14 @@ SECTIONS
81 __sun4v_2insn_patch = .; 81 __sun4v_2insn_patch = .;
82 .sun4v_2insn_patch : { *(.sun4v_2insn_patch) } 82 .sun4v_2insn_patch : { *(.sun4v_2insn_patch) }
83 __sun4v_2insn_patch_end = .; 83 __sun4v_2insn_patch_end = .;
84
85#ifdef CONFIG_BLK_DEV_INITRD
84 . = ALIGN(8192); 86 . = ALIGN(8192);
85 __initramfs_start = .; 87 __initramfs_start = .;
86 .init.ramfs : { *(.init.ramfs) } 88 .init.ramfs : { *(.init.ramfs) }
87 __initramfs_end = .; 89 __initramfs_end = .;
90#endif
91
88 . = ALIGN(8192); 92 . = ALIGN(8192);
89 __per_cpu_start = .; 93 __per_cpu_start = .;
90 .data.percpu : { *(.data.percpu) } 94 .data.percpu : { *(.data.percpu) }
diff --git a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S
index 3a5fd07fe064..356308221251 100644
--- a/arch/v850/kernel/vmlinux.lds.S
+++ b/arch/v850/kernel/vmlinux.lds.S
@@ -190,12 +190,16 @@
190 __root_fs_image_start = . ; \ 190 __root_fs_image_start = . ; \
191 *(.root) \ 191 *(.root) \
192 __root_fs_image_end = . ; 192 __root_fs_image_end = . ;
193
194#ifdef CONFIG_BLK_DEV_INITRD
193/* The initramfs archive. */ 195/* The initramfs archive. */
194#define INITRAMFS_CONTENTS \ 196#define INITRAMFS_CONTENTS \
195 . = ALIGN (4) ; \ 197 . = ALIGN (4) ; \
196 ___initramfs_start = . ; \ 198 ___initramfs_start = . ; \
197 *(.init.ramfs) \ 199 *(.init.ramfs) \
198 ___initramfs_end = . ; 200 ___initramfs_end = . ;
201#endif
202
199/* Where the initial bootmap (bitmap for the boot-time memory allocator) 203/* Where the initial bootmap (bitmap for the boot-time memory allocator)
200 should be place. */ 204 should be place. */
201#define BOOTMAP_CONTENTS \ 205#define BOOTMAP_CONTENTS \
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S
index 1e54ddf2338d..c360c4225244 100644
--- a/arch/x86_64/kernel/vmlinux.lds.S
+++ b/arch/x86_64/kernel/vmlinux.lds.S
@@ -192,10 +192,14 @@ SECTIONS
192 from .altinstructions and .eh_frame */ 192 from .altinstructions and .eh_frame */
193 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } 193 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }
194 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } 194 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) }
195
196#ifdef CONFIG_BLK_DEV_INITRD
195 . = ALIGN(4096); 197 . = ALIGN(4096);
196 __initramfs_start = .; 198 __initramfs_start = .;
197 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } 199 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) }
198 __initramfs_end = .; 200 __initramfs_end = .;
201#endif
202
199 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); 203 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
200 __per_cpu_start = .; 204 __per_cpu_start = .;
201 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } 205 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) }
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index a36c104c3a52..ab6370054cee 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -203,10 +203,12 @@ SECTIONS
203 .data.percpu : { *(.data.percpu) } 203 .data.percpu : { *(.data.percpu) }
204 __per_cpu_end = .; 204 __per_cpu_end = .;
205 205
206#ifdef CONFIG_BLK_DEV_INITRD
206 . = ALIGN(4096); 207 . = ALIGN(4096);
207 __initramfs_start =.; 208 __initramfs_start =.;
208 .init.ramfs : { *(.init.ramfs) } 209 .init.ramfs : { *(.init.ramfs) }
209 __initramfs_end = .; 210 __initramfs_end = .;
211#endif
210 212
211 /* We need this dummy segment here */ 213 /* We need this dummy segment here */
212 214