Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips handle non-topdown binaries



details:   https://anonhg.NetBSD.org/src/rev/671fc3c89099
branches:  trunk
changeset: 793053:671fc3c89099
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 25 15:20:55 2014 +0000

description:
handle non-topdown binaries

diffstat:

 sys/arch/mips/mips/netbsd32_machdep.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r adb6424b4283 -r 671fc3c89099 sys/arch/mips/mips/netbsd32_machdep.c
--- a/sys/arch/mips/mips/netbsd32_machdep.c     Sat Jan 25 15:17:17 2014 +0000
+++ b/sys/arch/mips/mips/netbsd32_machdep.c     Sat Jan 25 15:20:55 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_machdep.c,v 1.10 2014/01/01 18:57:15 dsl Exp $        */
+/*     $NetBSD: netbsd32_machdep.c,v 1.11 2014/01/25 15:20:55 christos Exp $   */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.10 2014/01/01 18:57:15 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.11 2014/01/25 15:20:55 christos Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_coredump.h"
@@ -145,7 +145,10 @@
 vaddr_t
 netbsd32_vm_default_addr(struct proc *p, vaddr_t base, vsize_t size)
 {
-       return VM_DEFAULT_ADDRESS32(base, size);
+       if (p->p_vmspace->vm_map.flags & VM_MAP_TOPDOWN)
+               return VM_DEFAULT_ADDRESS32_TOPDOWN(base, size);
+       else
+               return VM_DEFAULT_ADDRESS32_BOTTOMUP(base, size);
 }
 
 



Home | Main Index | Thread Index | Old Index