diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-01-20 08:15:03 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2008-01-28 17:21:17 -0500 |
commit | 01ba2bdc6b639764745ff678caf3fb9e5bcd745a (patch) | |
tree | c6e7f1925687485c331189a2d55ff4f2bb0a09df /arch/x86 | |
parent | 6c5bd235bfd0b92188915465c7dfb377c1a4d451 (diff) |
all archs: consolidate init and exit sections in vmlinux.lds.h
This patch consolidate all definitions of .init.text, .init.data
and .exit.text, .exit.data section definitions in
the generic vmlinux.lds.h.
This is a preparational patch - alone it does not buy
us much good.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/vmlinux_32.lds.S | 14 | ||||
-rw-r--r-- | arch/x86/kernel/vmlinux_64.lds.S | 19 |
2 files changed, 23 insertions, 10 deletions
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S index 7d72cce00529..84c913f38f98 100644 --- a/arch/x86/kernel/vmlinux_32.lds.S +++ b/arch/x86/kernel/vmlinux_32.lds.S | |||
@@ -131,10 +131,12 @@ SECTIONS | |||
131 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { | 131 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { |
132 | __init_begin = .; | 132 | __init_begin = .; |
133 | _sinittext = .; | 133 | _sinittext = .; |
134 | *(.init.text) | 134 | INIT_TEXT |
135 | _einittext = .; | 135 | _einittext = .; |
136 | } | 136 | } |
137 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { *(.init.data) } | 137 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { |
138 | INIT_DATA | ||
139 | } | ||
138 | . = ALIGN(16); | 140 | . = ALIGN(16); |
139 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { | 141 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { |
140 | __setup_start = .; | 142 | __setup_start = .; |
@@ -169,8 +171,12 @@ SECTIONS | |||
169 | } | 171 | } |
170 | /* .exit.text is discard at runtime, not link time, to deal with references | 172 | /* .exit.text is discard at runtime, not link time, to deal with references |
171 | from .altinstructions and .eh_frame */ | 173 | from .altinstructions and .eh_frame */ |
172 | .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } | 174 | .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { |
173 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } | 175 | EXIT_TEXT |
176 | } | ||
177 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { | ||
178 | EXIT_DATA | ||
179 | } | ||
174 | #if defined(CONFIG_BLK_DEV_INITRD) | 180 | #if defined(CONFIG_BLK_DEV_INITRD) |
175 | . = ALIGN(4096); | 181 | . = ALIGN(4096); |
176 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { | 182 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { |
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S index ba8ea97abd21..ea5386944e67 100644 --- a/arch/x86/kernel/vmlinux_64.lds.S +++ b/arch/x86/kernel/vmlinux_64.lds.S | |||
@@ -155,12 +155,15 @@ SECTIONS | |||
155 | __init_begin = .; | 155 | __init_begin = .; |
156 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { | 156 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { |
157 | _sinittext = .; | 157 | _sinittext = .; |
158 | *(.init.text) | 158 | INIT_TEXT |
159 | _einittext = .; | 159 | _einittext = .; |
160 | } | 160 | } |
161 | __initdata_begin = .; | 161 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { |
162 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { *(.init.data) } | 162 | __initdata_begin = .; |
163 | __initdata_end = .; | 163 | INIT_DATA |
164 | __initdata_end = .; | ||
165 | } | ||
166 | |||
164 | . = ALIGN(16); | 167 | . = ALIGN(16); |
165 | __setup_start = .; | 168 | __setup_start = .; |
166 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { *(.init.setup) } | 169 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { *(.init.setup) } |
@@ -187,8 +190,12 @@ SECTIONS | |||
187 | } | 190 | } |
188 | /* .exit.text is discard at runtime, not link time, to deal with references | 191 | /* .exit.text is discard at runtime, not link time, to deal with references |
189 | from .altinstructions and .eh_frame */ | 192 | from .altinstructions and .eh_frame */ |
190 | .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } | 193 | .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { |
191 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } | 194 | EXIT_TEXT |
195 | } | ||
196 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { | ||
197 | EXIT_DATA | ||
198 | } | ||
192 | 199 | ||
193 | /* vdso blob that is mapped into user space */ | 200 | /* vdso blob that is mapped into user space */ |
194 | vdso_start = . ; | 201 | vdso_start = . ; |