summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2013-02-27 19:59:41 +0000
committerian <ian@FreeBSD.org>2013-02-27 19:59:41 +0000
commit767ecbeac8f1bbcb2ef28698862a3db0f3be48d9 (patch)
tree19dafc0dd51b97926eb2568a1f1e1d067070bf49 /sys/boot/common
parent8c2c9fac8bcaac70121251ccda4407c827e44eed (diff)
downloadFreeBSD-src-767ecbeac8f1bbcb2ef28698862a3db0f3be48d9.zip
FreeBSD-src-767ecbeac8f1bbcb2ef28698862a3db0f3be48d9.tar.gz
Fix a typo that prevented booting a kernel that had virtual addresses in
the elf headers.
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/load_elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/common/load_elf.c b/sys/boot/common/load_elf.c
index d712b3d..3a4152e 100644
--- a/sys/boot/common/load_elf.c
+++ b/sys/boot/common/load_elf.c
@@ -304,7 +304,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off)
* only adjust the entry point if it's a virtual address to begin with.
*/
off = -0xc0000000u;
- if ((ehdr->e_entry & 0xc0000000u) == 0xc000000u)
+ if ((ehdr->e_entry & 0xc0000000u) == 0xc0000000u)
ehdr->e_entry += off;
#ifdef ELF_VERBOSE
printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n", ehdr->e_entry, off);
OpenPOWER on IntegriCloud