diff options
Diffstat (limited to 'arch/x86/kernel/vmlinux_32.lds.S')
-rw-r--r-- | arch/x86/kernel/vmlinux_32.lds.S | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S index 0d860963f268..62ad500d55f3 100644 --- a/arch/x86/kernel/vmlinux_32.lds.S +++ b/arch/x86/kernel/vmlinux_32.lds.S | |||
@@ -189,15 +189,24 @@ SECTIONS | |||
189 | *(.bss) | 189 | *(.bss) |
190 | . = ALIGN(4); | 190 | . = ALIGN(4); |
191 | __bss_stop = .; | 191 | __bss_stop = .; |
192 | _end = . ; | 192 | } |
193 | /* This is where the kernel creates the early boot page tables */ | 193 | |
194 | .brk : AT(ADDR(.brk) - LOAD_OFFSET) { | ||
194 | . = ALIGN(PAGE_SIZE); | 195 | . = ALIGN(PAGE_SIZE); |
195 | pg0 = . ; | 196 | __brk_base = . ; |
197 | . += 64 * 1024 ; /* 64k alignment slop space */ | ||
198 | *(.brk_reservation) /* areas brk users have reserved */ | ||
199 | __brk_limit = . ; | ||
200 | } | ||
201 | |||
202 | .end : AT(ADDR(.end) - LOAD_OFFSET) { | ||
203 | _end = . ; | ||
196 | } | 204 | } |
197 | 205 | ||
198 | /* Sections to be discarded */ | 206 | /* Sections to be discarded */ |
199 | /DISCARD/ : { | 207 | /DISCARD/ : { |
200 | *(.exitcall.exit) | 208 | *(.exitcall.exit) |
209 | *(.discard) | ||
201 | } | 210 | } |
202 | 211 | ||
203 | STABS_DEBUG | 212 | STABS_DEBUG |
@@ -205,6 +214,12 @@ SECTIONS | |||
205 | DWARF_DEBUG | 214 | DWARF_DEBUG |
206 | } | 215 | } |
207 | 216 | ||
217 | /* | ||
218 | * Build-time check on the image size: | ||
219 | */ | ||
220 | ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE), | ||
221 | "kernel image bigger than KERNEL_IMAGE_SIZE") | ||
222 | |||
208 | #ifdef CONFIG_KEXEC | 223 | #ifdef CONFIG_KEXEC |
209 | /* Link time checks */ | 224 | /* Link time checks */ |
210 | #include <asm/kexec.h> | 225 | #include <asm/kexec.h> |