summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/vmlinux.lds.S
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-09 01:20:34 +0200
committerH. Peter Anvin <hpa@zytor.com>2009-05-09 02:18:10 +0200
commit5b11f1cee5797b38d16b94d8745b12b6727a8373 (patch)
tree01d9ce7df1629c1ec17815c33ad3ce8b5bed3094 /arch/x86/boot/compressed/vmlinux.lds.S
parentx86, boot: stylistic cleanups for boot/compressed/head_64.S (diff)
downloadlinux-5b11f1cee5797b38d16b94d8745b12b6727a8373.tar.xz
linux-5b11f1cee5797b38d16b94d8745b12b6727a8373.zip
x86, boot: straighten out ranges to copy/zero in compressed/head*.S
Both on 32 and 64 bits, we copy all the way up to the end of bss, except that on 64 bits there is a hack to avoid copying on top of the page tables. There is no point in copying bss at all, especially since we are just about to zero it all anyway. To clean up and unify the handling, we now do: - copy from startup_32 to _bss. - zero from _bss to _ebss. - the _ebss symbol is aligned to an 8-byte boundary. - the page tables are moved to a separate section. Use _bss as the copy endpoint since _edata may be misaligned. [ Impact: cleanup, trivial performance improvement ] Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/boot/compressed/vmlinux.lds.S')
-rw-r--r--arch/x86/boot/compressed/vmlinux.lds.S19
1 files changed, 12 insertions, 7 deletions
diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
index dbe515e13fef..cc353e1b3ffd 100644
--- a/arch/x86/boot/compressed/vmlinux.lds.S
+++ b/arch/x86/boot/compressed/vmlinux.lds.S
@@ -2,6 +2,8 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
#undef i386
+#include <asm/page_types.h>
+
#ifdef CONFIG_X86_64
OUTPUT_ARCH(i386:x86-64)
ENTRY(startup_64)
@@ -48,13 +50,16 @@ SECTIONS
*(.bss)
*(.bss.*)
*(COMMON)
-#ifdef CONFIG_X86_64
- . = ALIGN(8);
- _end_before_pgt = . ;
- . = ALIGN(4096);
- pgtable = . ;
- . = . + 4096 * 6;
-#endif
+ . = ALIGN(8); /* For convenience during zeroing */
_ebss = .;
}
+#ifdef CONFIG_X86_64
+ . = ALIGN(PAGE_SIZE);
+ .pgtable : {
+ _pgtable = . ;
+ *(.pgtable)
+ _epgtable = . ;
+ }
+#endif
+ _end = .;
}