Align the kernel to a 16-byte boundary
authorH. Peter Anvin <hpa@zytor.com>
Tue, 8 Jan 2008 22:30:54 +0000 (14:30 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 8 Jan 2008 22:30:54 +0000 (14:30 -0800)
Align the kernel to a 16-byte boundary in the image.  This is meant to
improve copying performance.

linux.c

diff --git a/linux.c b/linux.c
index 6570176..54df4ac 100644 (file)
--- a/linux.c
+++ b/linux.c
@@ -287,7 +287,7 @@ int wrap_kernel(const char *kernel_file, const char *cmdline,
 
   /* Segment: Linux kernel proper */
   skrn.next     = ninitrd ? &ird[0].seg : NULL;
-  skrn.align    = 2;           /* 2**2 = 4 bytes */
+  skrn.align    = 4;           /* 2**4 = 16 bytes */
   skrn.length   = kernel_len - setup_len;
   skrn.sh_type  = SHT_PROGBITS;
   skrn.sh_flags = SHF_ALLOC;