aboutsummaryrefslogtreecommitdiffstats
path: root/com32
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-04 17:34:46 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-04 17:34:46 -0700
commitd6c3d86ccb0e4a21259f617fef3fdef88b23d06a (patch)
tree43e40833dfaf4dfaf83714310f87fbd85040eae3 /com32
parentff2f2c391c80835e8725447f0cf644f2bbfee51f (diff)
downloadsyslinux-d6c3d86ccb0e4a21259f617fef3fdef88b23d06a.tar.gz
syslinux-d6c3d86ccb0e4a21259f617fef3fdef88b23d06a.tar.xz
syslinux-d6c3d86ccb0e4a21259f617fef3fdef88b23d06a.zip
load_linux.c: when relocating, need to update code32_start
The normal value for code32_start is based on the kernel load address (in fact, it usually *is* the kernel load address); accordingly, it needs to be updated if the kernel is relocated. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32')
-rw-r--r--com32/lib/syslinux/load_linux.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/com32/lib/syslinux/load_linux.c b/com32/lib/syslinux/load_linux.c
index b1667f04..5df5f5e9 100644
--- a/com32/lib/syslinux/load_linux.c
+++ b/com32/lib/syslinux/load_linux.c
@@ -380,6 +380,7 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size,
however, account for the fact that the kernel is decompressed
into a whole other place, either. */
if (end - start >= 3*prot_mode_size) {
+ whdr->code32_start += start - prot_mode_base;
prot_mode_base = start;
ok = true;
break;