summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-09-20 23:26:03 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-09-20 23:26:03 +0000
commit04831653327fc946ceec601ea70eb46c83e684a5 (patch)
treee779784562a6932d87cd861484c068b1b557d859 /sys/arch/sparc64
parent3c8fcefce24fff317ec33f8ba639757c2314cabd (diff)
From NetBSD: allow loading of kernels with bss+data > 4M
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/stand/ofwboot/elfXX_exec.c4
-rw-r--r--sys/arch/sparc64/stand/ofwboot/version2
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc64/stand/ofwboot/elfXX_exec.c b/sys/arch/sparc64/stand/ofwboot/elfXX_exec.c
index e01f23abb9f..252b48e1cec 100644
--- a/sys/arch/sparc64/stand/ofwboot/elfXX_exec.c
+++ b/sys/arch/sparc64/stand/ofwboot/elfXX_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elfXX_exec.c,v 1.2 2001/08/20 19:55:33 jason Exp $ */
+/* $OpenBSD: elfXX_exec.c,v 1.3 2001/09/20 23:26:02 jason Exp $ */
/* $NetBSD: elfXX_exec.c,v 1.2 2001/08/15 20:08:15 eeh Exp $ */
/*
@@ -108,7 +108,7 @@ CAT3(elf, ELFSIZE, _exec)(fd, elf, entryp, ssymp, esymp)
if ((phdr.p_vaddr & (4*MEG-1)) == 0)
align = 4*MEG;
if (phdr.p_filesz < phdr.p_memsz)
- phdr.p_memsz = 4*MEG;
+ phdr.p_memsz = (phdr.p_memsz + 4*MEG) & ~(4*MEG-1);
if (OF_claim((void *)(long)phdr.p_vaddr, phdr.p_memsz, align) ==
(void *)-1)
panic("cannot claim memory");
diff --git a/sys/arch/sparc64/stand/ofwboot/version b/sys/arch/sparc64/stand/ofwboot/version
index d00491fd7e5..0cfbf08886f 100644
--- a/sys/arch/sparc64/stand/ofwboot/version
+++ b/sys/arch/sparc64/stand/ofwboot/version
@@ -1 +1 @@
-1
+2