aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@in.ibm.com>2006-12-06 20:14:10 -0500
committerAndi Kleen <andi@basil.nowhere.org>2006-12-06 20:14:10 -0500
commit79929fd1c1887d2a057cbb80d487a2e2f1c01a02 (patch)
tree54090a688a9610ebc3c53f7b9529e287f8eaafc0 /arch/i386/kernel/vmlinux.lds.S
parent2c22d8baa98a92022acb85b0b7c6f4a60df55f47 (diff)
[PATCH] i386: Convert more absolute symbols to section relative
o Convert more absolute symbols to section relative to keep the theme in vmlinux.lds.S file and to avoid problem if kernel is relocated. o Also put a message so that in future people can be aware of it and avoid introducing absolute symbols. Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'arch/i386/kernel/vmlinux.lds.S')
-rw-r--r--arch/i386/kernel/vmlinux.lds.S14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S
index 877dc5cfe3a8..25581e87c60d 100644
--- a/arch/i386/kernel/vmlinux.lds.S
+++ b/arch/i386/kernel/vmlinux.lds.S
@@ -8,6 +8,12 @@
8 * put it inside the section definition. 8 * put it inside the section definition.
9 */ 9 */
10 10
11/* Don't define absolute symbols until and unless you know that symbol
12 * value is should remain constant even if kernel image is relocated
13 * at run time. Absolute symbols are not relocated. If symbol value should
14 * change if kernel is relocated, make the symbol section relative and
15 * put it inside the section definition.
16 */
11#define LOAD_OFFSET __PAGE_OFFSET 17#define LOAD_OFFSET __PAGE_OFFSET
12 18
13#include <asm-generic/vmlinux.lds.h> 19#include <asm-generic/vmlinux.lds.h>
@@ -65,11 +71,11 @@ SECTIONS
65 CONSTRUCTORS 71 CONSTRUCTORS
66 } :data 72 } :data
67 73
68 __start_paravirtprobe = .;
69 .paravirtprobe : AT(ADDR(.paravirtprobe) - LOAD_OFFSET) { 74 .paravirtprobe : AT(ADDR(.paravirtprobe) - LOAD_OFFSET) {
75 __start_paravirtprobe = .;
70 *(.paravirtprobe) 76 *(.paravirtprobe)
77 __stop_paravirtprobe = .;
71 } 78 }
72 __stop_paravirtprobe = .;
73 79
74 . = ALIGN(4096); 80 . = ALIGN(4096);
75 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { 81 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
@@ -172,11 +178,11 @@ SECTIONS
172 *(.altinstr_replacement) 178 *(.altinstr_replacement)
173 } 179 }
174 . = ALIGN(4); 180 . = ALIGN(4);
175 __start_parainstructions = .;
176 .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) { 181 .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) {
182 __start_parainstructions = .;
177 *(.parainstructions) 183 *(.parainstructions)
184 __stop_parainstructions = .;
178 } 185 }
179 __stop_parainstructions = .;
180 /* .exit.text is discard at runtime, not link time, to deal with references 186 /* .exit.text is discard at runtime, not link time, to deal with references
181 from .altinstructions and .eh_frame */ 187 from .altinstructions and .eh_frame */
182 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } 188 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) }