aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorGeoff Rehmet <csgr@FreeBSD.org>1994-07-22 13:17:07 +0000
committerGeoff Rehmet <csgr@FreeBSD.org>1994-07-22 13:17:07 +0000
commit408dc3832ac8d30fba02dab41716c30219d3a408 (patch)
tree21c1478dce3c253aa14ddb21493edf3d63529ae5 /usr.sbin
parent1f80968a0bb84c5b471280a4b17fb622c5a472f1 (diff)
downloadsrc-408dc3832ac8d30fba02dab41716c30219d3a408.tar.gz
src-408dc3832ac8d30fba02dab41716c30219d3a408.zip
The FreeBSD bootloader loads the kernel at the a_entry address in the
kernel a.out file, meaning that this is where the kernel starts. (not at KERNBASE) - KERNBASE is 0xf0000000, while the kernel loads at 0xf0100000 Reviewed by:
Notes
Notes: svn path=/head/; revision=1795
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/kvm_mkdb/nlist.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr.sbin/kvm_mkdb/nlist.c b/usr.sbin/kvm_mkdb/nlist.c
index 036b32a49c42..f1d004c57a4b 100644
--- a/usr.sbin/kvm_mkdb/nlist.c
+++ b/usr.sbin/kvm_mkdb/nlist.c
@@ -136,8 +136,19 @@ create_knlist(name, db)
if (strcmp((char *)key.data, VRS_SYM) == 0) {
long cur_off, voff;
#ifndef KERNTEXTOFF
+/*
+ * XXX
+ * The FreeBSD bootloader loads the kernel at the a_entry address, meaning
+ * that this is where the kernel starts. (not at KERNBASE)
+ *
+ * This may be introducing an i386 dependency.
+ */
+#if defined(__FreeBSD__)
+#define KERNTEXTOFF ebuf.a_entry
+#else
#define KERNTEXTOFF KERNBASE
#endif
+#endif
/*
* Calculate offset relative to a normal (non-kernel)
* a.out. KERNTEXTOFF is where the kernel is really