Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sgimips/sgimips When loadfile() leaves the ELF head...
details: https://anonhg.NetBSD.org/src/rev/a994b42e59ad
branches: trunk
changeset: 517562:a994b42e59ad
user: mhitch <mhitch%NetBSD.org@localhost>
date: Wed Nov 14 22:47:16 2001 +0000
description:
When loadfile() leaves the ELF header at the end of the kernel, it enables
erroneous code that tries to compute the end of the symbol table. Disable
that for now so that kernels don't hang when booted from the disk.
diffstat:
sys/arch/sgimips/sgimips/machdep.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r 0858d9ecb9b1 -r a994b42e59ad sys/arch/sgimips/sgimips/machdep.c
--- a/sys/arch/sgimips/sgimips/machdep.c Wed Nov 14 22:29:23 2001 +0000
+++ b/sys/arch/sgimips/sgimips/machdep.c Wed Nov 14 22:47:16 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.29 2001/11/11 17:21:41 rafal Exp $ */
+/* $NetBSD: machdep.c,v 1.30 2001/11/14 22:47:16 mhitch Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@@ -198,7 +198,15 @@
if (memcmp(((Elf_Ehdr *)end)->e_ident, ELFMAG, SELFMAG) == 0 &&
((Elf_Ehdr *)end)->e_ident[EI_CLASS] == ELFCLASS) {
esym = end;
+#if 0
+ /*
+ * This isn't right: end is a KSEG0 address, and the
+ * kernel entry is a KSEG0 address. Adding them overflows
+ * into user address space and will hang during boot.
+ * For now, leave esym pointing to end.
+ */
esym += ((Elf_Ehdr *)end)->e_entry;
+#endif
kernend = (caddr_t)mips_round_page(esym);
memset(edata, 0, end - edata);
} else
Home |
Main Index |
Thread Index |
Old Index