diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-04-29 03:47:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-29 04:20:32 -0400 |
commit | 1f6397bac55040cd520d9eaf299e155a7aa01d5f (patch) | |
tree | 991bccc160d0e5e1825da18b4ca899d1e5f7b14f /arch/x86/kernel/vmlinux.lds.S | |
parent | 448bc3ab0d03e77fee8e4264de0d001fc87bc164 (diff) |
x86, vmlinux.lds: unify data output sections
For 64 bit the following functional changes are introduced:
- .data.page_aligned has moved
- .data.cacheline_aligned has moved
- .data.read_mostly has moved
- ALIGN() moved out of output section for .data.cacheline_aligned
- ALIGN() moved out of output section for .data.page_aligned
Notice that 32 bit and 64 bit has different location of _edata.
.data_nosave is 32 bit only as 64 bit is special due to PERCPU.
[ Impact: 32-bit: cleanup, 64-bit: use 32-bit linker script ]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tim Abbott <tabbott@MIT.EDU>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1240991249-27117-7-git-send-email-sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/x86/kernel/vmlinux.lds.S | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 67164f6f092f..067bdb012dad 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
@@ -104,6 +104,61 @@ SECTIONS | |||
104 | 104 | ||
105 | RODATA | 105 | RODATA |
106 | 106 | ||
107 | /* Data */ | ||
108 | . = ALIGN(PAGE_SIZE); | ||
109 | .data : AT(ADDR(.data) - LOAD_OFFSET) { | ||
110 | DATA_DATA | ||
111 | CONSTRUCTORS | ||
112 | |||
113 | #ifdef CONFIG_X86_64 | ||
114 | /* End of data section */ | ||
115 | _edata = .; | ||
116 | #endif | ||
117 | } :data | ||
118 | |||
119 | #ifdef CONFIG_X86_32 | ||
120 | /* 32 bit has nosave before _edata */ | ||
121 | . = ALIGN(PAGE_SIZE); | ||
122 | .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { | ||
123 | __nosave_begin = .; | ||
124 | *(.data.nosave) | ||
125 | . = ALIGN(PAGE_SIZE); | ||
126 | __nosave_end = .; | ||
127 | } | ||
128 | #endif | ||
129 | |||
130 | . = ALIGN(PAGE_SIZE); | ||
131 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { | ||
132 | *(.data.page_aligned) | ||
133 | *(.data.idt) | ||
134 | } | ||
135 | |||
136 | #ifdef CONFIG_X86_32 | ||
137 | . = ALIGN(32); | ||
138 | #else | ||
139 | . = ALIGN(PAGE_SIZE); | ||
140 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); | ||
141 | #endif | ||
142 | .data.cacheline_aligned : | ||
143 | AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { | ||
144 | *(.data.cacheline_aligned) | ||
145 | } | ||
146 | |||
147 | /* rarely changed data like cpu maps */ | ||
148 | #ifdef CONFIG_X86_32 | ||
149 | . = ALIGN(32); | ||
150 | #else | ||
151 | . = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES); | ||
152 | #endif | ||
153 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { | ||
154 | *(.data.read_mostly) | ||
155 | |||
156 | #ifdef CONFIG_X86_32 | ||
157 | /* End of data section */ | ||
158 | _edata = .; | ||
159 | #endif | ||
160 | } | ||
161 | |||
107 | 162 | ||
108 | #ifdef CONFIG_X86_32 | 163 | #ifdef CONFIG_X86_32 |
109 | # include "vmlinux_32.lds.S" | 164 | # include "vmlinux_32.lds.S" |