From 636eb238699ccc95dae76a460941ac181e477804 Mon Sep 17 00:00:00 2001 From: mhitch Date: Wed, 14 Nov 2001 22:47:16 +0000 Subject: [PATCH] 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. --- sys/arch/sgimips/sgimips/machdep.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/arch/sgimips/sgimips/machdep.c b/sys/arch/sgimips/sgimips/machdep.c index 958d4ca9dd3e..18e1bc630be6 100644 --- a/sys/arch/sgimips/sgimips/machdep.c +++ b/sys/arch/sgimips/sgimips/machdep.c @@ -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 @@ mach_init(argc, argv, envp) 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