]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86/brk: put the brk reservations in their own section
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Sun, 15 Mar 2009 06:20:47 +0000 (23:20 -0700)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Tue, 17 Mar 2009 19:58:15 +0000 (12:58 -0700)
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>
arch/x86/kernel/vmlinux_32.lds.S
arch/x86/kernel/vmlinux_64.lds.S

index 98424f33e0771b839b0cc76d530a849b26704f25..de14973e47fd505106d3eb9773d24a34658d7d78 100644 (file)
@@ -189,16 +189,18 @@ SECTIONS
        *(.bss)
        . = ALIGN(4);
        __bss_stop = .;
+  }
 
+  .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
        . = ALIGN(PAGE_SIZE);
        __brk_base = . ;
-       . += 64 * 1024 ;        /* 64k slop space */
+       . += 64 * 1024 ;        /* 64k alignment slop space */
        *(.brk_reservation)     /* areas brk users have reserved */
        __brk_limit = . ;
-
-       _end = . ;
   }
 
+  _end = . ;
+
   /* Sections to be discarded */
   /DISCARD/ : {
        *(.exitcall.exit)
index 7996687663a2bc53b2a815bb9c098a2c0468c008..c8742507b030bec22bb90fcdcfc12d5dcdb35da7 100644 (file)
@@ -247,10 +247,12 @@ SECTIONS
        *(.bss.page_aligned)
        *(.bss)
        __bss_stop = .;
+  }
 
+  .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
        . = ALIGN(PAGE_SIZE);
        __brk_base = . ;
-       . += 64 * 1024;         /* 64k slop space */
+       . += 64 * 1024 ;        /* 64k alignment slop space */
        *(.brk_reservation)     /* areas brk users have reserved */
        __brk_limit = . ;
   }