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 Make pre-2.0 ELF binaries (with gcc-2.95....



details:   https://anonhg.NetBSD.org/src/rev/e2bf9fbe5207
branches:  trunk
changeset: 760902:e2bf9fbe5207
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Jan 16 09:50:44 2011 +0000

description:
Make pre-2.0 ELF binaries (with gcc-2.95.3/binutils-2.11.2) actually work
with options COMPAT_16.
Tested on R3000 pmax and R5000 sgimips, closes PR port-mips/44375.

diffstat:

 sys/arch/mips/mips/cpu_exec.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 7fbaf3762287 -r e2bf9fbe5207 sys/arch/mips/mips/cpu_exec.c
--- a/sys/arch/mips/mips/cpu_exec.c     Sun Jan 16 09:08:29 2011 +0000
+++ b/sys/arch/mips/mips/cpu_exec.c     Sun Jan 16 09:50:44 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu_exec.c,v 1.59 2009/12/14 04:09:38 mrg Exp $        */
+/*     $NetBSD: cpu_exec.c,v 1.60 2011/01/16 09:50:44 tsutsui Exp $    */
 
 /*
  * Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.59 2009/12/14 04:09:38 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.60 2011/01/16 09:50:44 tsutsui Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_ultrix.h"
@@ -291,12 +291,14 @@
                        printf("pid %d(%s): ABI set to N32 (e_flags=%#x)\n", p->p_pid, p->p_comm, eh->e_flags);
                break;
 #endif
+#ifdef COMPAT_16
+       case 0:
+               *start_p = ELF32_LINK_ADDR;
+               /* FALLTHROUGH */
+#endif
        case EF_MIPS_ABI_O32:
                itp_suffix = "o32";
                p->p_md.md_abi = _MIPS_BSD_API_O32;
-#ifdef COMPAT_16
-               *start_p = ELF32_LINK_ADDR;
-#endif
                if (old_abi != p->p_md.md_abi)
                        printf("pid %d(%s): ABI set to O32 (e_flags=%#x)\n", p->p_pid, p->p_comm, eh->e_flags);
                break;



Home | Main Index | Thread Index | Old Index