Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern no need to define emul_osf1, <compat/osf1/osf1_exec...
details: https://anonhg.NetBSD.org/src/rev/c7f66cfa9633
branches: trunk
changeset: 499891:c7f66cfa9633
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Fri Dec 01 12:57:55 2000 +0000
description:
no need to define emul_osf1, <compat/osf1/osf1_exec.h> defines it for us now
set execsw[] entrys' priority to appropriate values
diffstat:
sys/kern/exec_conf.c | 59 ++++++++++++++++++++++++---------------------------
1 files changed, 28 insertions(+), 31 deletions(-)
diffs (198 lines):
diff -r 77f2dd16c587 -r c7f66cfa9633 sys/kern/exec_conf.c
--- a/sys/kern/exec_conf.c Fri Dec 01 12:56:25 2000 +0000
+++ b/sys/kern/exec_conf.c Fri Dec 01 12:57:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_conf.c,v 1.48 2000/11/28 21:58:12 thorpej Exp $ */
+/* $NetBSD: exec_conf.c,v 1.49 2000/12/01 12:57:55 jdolecek Exp $ */
/*
* Copyright (c) 1993, 1994 Christopher G. Demetriou
@@ -137,18 +137,16 @@
#ifdef COMPAT_AOUT
extern const struct emul emul_netbsd_aout;
#endif
-#ifdef COMPAT_OSF1
-extern const struct emul emul_osf1;
-#endif
const struct execsw execsw[] = {
#ifdef EXEC_SCRIPT
- { MAXINTERP, exec_script_makecmds, }, /* shell scripts */
+ { MAXINTERP, exec_script_makecmds, { NULL },
+ NULL, EXECSW_PRIO_ANY, }, /* shell scripts */
#endif
#ifdef EXEC_AOUT
#ifdef COMPAT_NETBSD32
{ sizeof(struct netbsd32_exec), exec_netbsd32_makecmds, { NULL },
- &emul_netbsd32, 0,
+ &emul_netbsd32, EXECSW_PRIO_FIRST,
0, netbsd32_copyargs, netbsd32_setregs }, /* sparc 32 bit */
#endif
{ sizeof(struct exec), exec_aout_makecmds, { NULL },
@@ -157,32 +155,31 @@
#else
&emul_netbsd,
#endif /* COMPAT_AOUT */
- 0,
+ EXECSW_PRIO_ANY,
0, copyargs, setregs }, /* a.out binaries */
#endif
#ifdef EXEC_COFF
{ COFF_HDR_SIZE, exec_coff_makecmds, { NULL },
- &emul_netbsd, 0,
+ &emul_netbsd, EXECSW_PRIO_ANY,
0, copyargs, setregs }, /* coff binaries */
#endif
#ifdef EXEC_ECOFF
#ifdef COMPAT_OSF1
{ ECOFF_HDR_SIZE, exec_ecoff_makecmds,
{ ecoff_probe_func: osf1_exec_ecoff_probe },
- &emul_osf1, 0,
+ &emul_osf1, EXECSW_PRIO_ANY,
howmany(OSF1_MAX_AUX_ENTRIES * sizeof (struct osf1_auxv) +
2 * (MAXPATHLEN + 1), sizeof (char *)), /* exec & loader names */
osf1_copyargs, cpu_exec_ecoff_setregs }, /* OSF1 ecoff binaries */
#endif /* COMPAT_OSF1 */
{ ECOFF_HDR_SIZE, exec_ecoff_makecmds,
{ ecoff_probe_func: cpu_exec_ecoff_probe },
- &emul_netbsd, 0,
+ &emul_netbsd, EXECSW_PRIO_ANY,
0, copyargs, cpu_exec_ecoff_setregs }, /* ecoff binaries */
#ifdef COMPAT_ULTRIX
- /* XXX this has to be last, the probe function always succeeds */
{ ECOFF_HDR_SIZE, exec_ecoff_makecmds,
{ ecoff_probe_func: ultrix_exec_ecoff_probe },
- &emul_ultrix, 0,
+ &emul_ultrix, EXECSW_PRIO_LAST, /* XXX probe func alw. succeeds */
0, copyargs, cpu_exec_ecoff_setregs }, /* Ultrix ecoff binaries */
#endif /* COMPAT_ULTRIX */
#endif
@@ -191,46 +188,46 @@
#ifdef COMPAT_NETBSD32
{ sizeof (Elf32_Ehdr), exec_elf32_makecmds,
{ elf_probe_func: ELF32NAME2(netbsd32,probe) },
- &emul_netbsd32, 0,
+ &emul_netbsd32, EXECSW_PRIO_FIRST,
howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
netbsd32_elf32_copyargs, netbsd32_setregs }, /* NetBSD32 32bit ELF bins */
/* This one should go first so it matches instead of netbsd */
#endif
{ sizeof (Elf32_Ehdr), exec_elf32_makecmds,
{ elf_probe_func: ELF32NAME2(netbsd,probe) },
- &emul_netbsd, 0,
+ &emul_netbsd, EXECSW_PRIO_ANY,
howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
elf32_copyargs, setregs }, /* NetBSD 32bit ELF bins */
#ifdef COMPAT_FREEBSD
{ sizeof (Elf32_Ehdr), exec_elf32_makecmds,
{ elf_probe_func: ELF32NAME2(freebsd,probe) },
- &emul_freebsd, 0,
+ &emul_freebsd, EXECSW_PRIO_ANY,
FREEBSD_ELF_AUX_ARGSIZ,
elf32_copyargs, setregs }, /* FreeBSD 32bit ELF bins (not 64bit safe )*/
#endif
#ifdef COMPAT_LINUX
{ sizeof (Elf32_Ehdr), exec_elf32_makecmds,
{ elf_probe_func: ELF32NAME2(linux,probe) },
- &emul_linux, 0,
+ &emul_linux, EXECSW_PRIO_ANY,
LINUX_ELF_AUX_ARGSIZ,
LINUX_COPYARGS_FUNCTION, setregs }, /* Linux 32bit ELF bins */
#endif
#ifdef COMPAT_SVR4
{ sizeof (Elf32_Ehdr), exec_elf32_makecmds,
{ elf_probe_func: ELF32NAME2(svr4,probe) },
- &emul_svr4, 0,
+ &emul_svr4, EXECSW_PRIO_ANY,
SVR4_AUX_ARGSIZ,
svr4_copyargs, svr4_setregs }, /* SVR4 32bit ELF bins (not 64bit safe) */
#endif
#ifdef COMPAT_IBCS2
{ sizeof (Elf32_Ehdr), exec_elf32_makecmds,
{ elf_probe_func: ELF32NAME2(ibcs2,probe) },
- &emul_ibcs2, 0,
+ &emul_ibcs2, EXECSW_PRIO_ANY,
IBCS2_ELF_AUX_ARGSIZ, elf32_copyargs, setregs },
/* SCO 32bit ELF bins (not 64bit safe) */
#endif
{ sizeof (Elf32_Ehdr), exec_elf32_makecmds, { NULL },
- &emul_netbsd, 0,
+ &emul_netbsd, EXECSW_PRIO_LAST, /* catch all entry */
howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
elf32_copyargs, setregs }, /* NetBSD 32bit ELF bins */
#endif /* EXEC_ELF32 */
@@ -238,62 +235,62 @@
/* 64bit ELF bins */
{ sizeof (Elf64_Ehdr), exec_elf64_makecmds,
{ elf_probe_func: ELF64NAME2(netbsd,probe) },
- &emul_netbsd, 0,
+ &emul_netbsd, EXECSW_PRIO_ANY,
howmany(ELF_AUX_ENTRIES * sizeof(Aux64Info), sizeof (Elf64_Addr)),
elf64_copyargs, setregs }, /* NetBSD 64bit ELF bins */
#ifdef COMPAT_LINUX
{ sizeof (Elf64_Ehdr), exec_elf64_makecmds,
{ elf_probe_func: ELF64NAME2(linux,probe) },
- &emul_linux, 0,
+ &emul_linux, EXECSW_PRIO_ANY,
LINUX_ELF_AUX_ARGSIZ,
linux_elf64_copyargs, setregs }, /* Linux 64bit ELF bins */
#endif
{ sizeof (Elf64_Ehdr), exec_elf64_makecmds, { NULL },
- &emul_netbsd, 0,
+ &emul_netbsd, EXECSW_PRIO_ANY,
howmany(ELF_AUX_ENTRIES * sizeof(Aux64Info), sizeof (Elf64_Addr)),
elf64_copyargs, setregs }, /* NetBSD 64bit ELF bins */
#endif /* EXEC_ELF64 */
#ifdef COMPAT_SUNOS
{ SUNOS_AOUT_HDR_SIZE, exec_sunos_aout_makecmds, { NULL },
- &emul_sunos, 0,
+ &emul_sunos, EXECSW_PRIO_ANY,
0, copyargs, setregs }, /* SunOS a.out */
#endif
#if defined(COMPAT_LINUX) && defined(EXEC_AOUT)
{ LINUX_AOUT_HDR_SIZE, exec_linux_aout_makecmds, { NULL },
- &emul_linux, 0,
+ &emul_linux, EXECSW_PRIO_ANY,
LINUX_AOUT_AUX_ARGSIZ, linux_aout_copyargs, linux_setregs }, /* linux a.out */
#endif
#ifdef COMPAT_IBCS2
{ COFF_HDR_SIZE, exec_ibcs2_coff_makecmds, { NULL },
- &emul_ibcs2, 0,
+ &emul_ibcs2, EXECSW_PRIO_ANY,
0, copyargs, ibcs2_setregs }, /* coff binaries */
{ XOUT_HDR_SIZE, exec_ibcs2_xout_makecmds, { NULL },
- &emul_ibcs2, 0,
+ &emul_ibcs2, EXECSW_PRIO_ANY,
0, copyargs, ibcs2_setregs }, /* x.out binaries */
#endif
#if defined(COMPAT_FREEBSD) && defined(EXEC_AOUT)
{ FREEBSD_AOUT_HDR_SIZE, exec_freebsd_aout_makecmds, { NULL },
- &emul_freebsd, 0,
+ &emul_freebsd, EXECSW_PRIO_ANY,
0, copyargs, freebsd_setregs }, /* a.out */
#endif
#ifdef COMPAT_HPUX
{ HPUX_EXEC_HDR_SIZE, exec_hpux_makecmds, { NULL },
- &emul_hpux, 0,
+ &emul_hpux, EXECSW_PRIO_ANY,
0, copyargs, hpux_setregs }, /* HP-UX a.out */
#endif
#ifdef COMPAT_M68K4K
{ sizeof(struct exec), exec_m68k4k_makecmds, { NULL },
- &emul_netbsd, 0,
+ &emul_netbsd, EXECSW_PRIO_ANY,
0, copyargs, setregs }, /* m68k4k a.out */
#endif
#ifdef COMPAT_VAX1K
{ sizeof(struct exec), exec_vax1k_makecmds, { NULL },
- &emul_netbsd, 0,
+ &emul_netbsd, EXECSW_PRIO_ANY,
0, copyargs, setregs }, /* vax1k a.out */
#endif
#ifdef COMPAT_PECOFF
{ sizeof(struct exec), exec_pecoff_makecmds, { NULL },
- &emul_netbsd, 0, /* XXX emul_pecoff once it's different */
+ &emul_netbsd, EXECSW_PRIO_ANY, /* XXX emul_pecoff once it's different */
howmany(sizeof(struct pecoff_args), sizeof(char *)),
pecoff_copyargs, setregs }, /* Win32/CE PE/COFF */
#endif
Home |
Main Index |
Thread Index |
Old Index