Commit 704439dd authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge

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: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
parent 0b1c723d
......@@ -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)
......
......@@ -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 = . ;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment