aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-03-15 02:20:47 -0400
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-03-17 15:58:15 -0400
commit704439ddf9f8ff1fc8c6d8abaac4bc4c95697e39 (patch)
tree51faea24d641a53086d5c37cad9f4cbb0b5c6f0b /arch/x86
parent0b1c723d0bd199300a1a2de57a46000d17577498 (diff)
x86/brk: put the brk reservations in their own section
Impact: disambiguate real .bss variables from .brk storage Add a .brk section after the .bss section. This has no effect on the final vmlinux, but it more clearly distinguishes the space taken by actual .bss symbols, and the variable space reserved by .brk users. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/vmlinux_32.lds.S8
-rw-r--r--arch/x86/kernel/vmlinux_64.lds.S4
2 files changed, 8 insertions, 4 deletions
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S
index 98424f33e077..de14973e47fd 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -189,16 +189,18 @@ SECTIONS
189 *(.bss) 189 *(.bss)
190 . = ALIGN(4); 190 . = ALIGN(4);
191 __bss_stop = .; 191 __bss_stop = .;
192 }
192 193
194 .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
193 . = ALIGN(PAGE_SIZE); 195 . = ALIGN(PAGE_SIZE);
194 __brk_base = . ; 196 __brk_base = . ;
195 . += 64 * 1024 ; /* 64k slop space */ 197 . += 64 * 1024 ; /* 64k alignment slop space */
196 *(.brk_reservation) /* areas brk users have reserved */ 198 *(.brk_reservation) /* areas brk users have reserved */
197 __brk_limit = . ; 199 __brk_limit = . ;
198
199 _end = . ;
200 } 200 }
201 201
202 _end = . ;
203
202 /* Sections to be discarded */ 204 /* Sections to be discarded */
203 /DISCARD/ : { 205 /DISCARD/ : {
204 *(.exitcall.exit) 206 *(.exitcall.exit)
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S
index 7996687663a2..c8742507b030 100644
--- a/arch/x86/kernel/vmlinux_64.lds.S
+++ b/arch/x86/kernel/vmlinux_64.lds.S
@@ -247,10 +247,12 @@ SECTIONS
247 *(.bss.page_aligned) 247 *(.bss.page_aligned)
248 *(.bss) 248 *(.bss)
249 __bss_stop = .; 249 __bss_stop = .;
250 }
250 251
252 .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
251 . = ALIGN(PAGE_SIZE); 253 . = ALIGN(PAGE_SIZE);
252 __brk_base = . ; 254 __brk_base = . ;
253 . += 64 * 1024; /* 64k slop space */ 255 . += 64 * 1024 ; /* 64k alignment slop space */
254 *(.brk_reservation) /* areas brk users have reserved */ 256 *(.brk_reservation) /* areas brk users have reserved */
255 __brk_limit = . ; 257 __brk_limit = . ;
256 } 258 }