[tip:x86/setup-memory] x86/brk: put the brk reservations in their own section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  704439ddf9f8ff1fc8c6d8abaac4bc4c95697e39
Gitweb:     http://git.kernel.org/tip/704439ddf9f8ff1fc8c6d8abaac4bc4c95697e39
Author:     Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
AuthorDate: Sat, 14 Mar 2009 23:20:47 -0700
Commit:     Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
CommitDate: Tue, 17 Mar 2009 12:58:15 -0700

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@xxxxxxxxxx>


---
 arch/x86/kernel/vmlinux_32.lds.S |    8 +++++---
 arch/x86/kernel/vmlinux_64.lds.S |    4 +++-
 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 98424f3..de14973 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -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)
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S
index 7996687..c874250 100644
--- a/arch/x86/kernel/vmlinux_64.lds.S
+++ b/arch/x86/kernel/vmlinux_64.lds.S
@@ -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 = . ;
   }
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux