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>
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;