From 408dc3832ac8d30fba02dab41716c30219d3a408 Mon Sep 17 00:00:00 2001 From: Geoff Rehmet Date: Fri, 22 Jul 1994 13:17:07 +0000 Subject: [PATCH] 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: --- usr.sbin/kvm_mkdb/nlist.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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,7 +136,18 @@ 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)