The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/kern/exec_conf.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: exec_conf.c,v 1.89 2005/03/03 04:39:37 christos Exp $  */
    2 
    3 /*
    4  * Copyright (c) 1993, 1994 Christopher G. Demetriou
    5  * All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
   10  * 1. Redistributions of source code must retain the above copyright
   11  *    notice, this list of conditions and the following disclaimer.
   12  * 2. Redistributions in binary form must reproduce the above copyright
   13  *    notice, this list of conditions and the following disclaimer in the
   14  *    documentation and/or other materials provided with the distribution.
   15  * 3. All advertising materials mentioning features or use of this software
   16  *    must display the following acknowledgement:
   17  *      This product includes software developed by Christopher G. Demetriou.
   18  * 4. The name of the author may not be used to endorse or promote products
   19  *    derived from this software without specific prior written permission
   20  *
   21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   22  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   23  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   24  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   26  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   30  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   31  */
   32 
   33 #include <sys/cdefs.h>
   34 __KERNEL_RCSID(0, "$NetBSD: exec_conf.c,v 1.89 2005/03/03 04:39:37 christos Exp $");
   35 
   36 #include "opt_execfmt.h"
   37 #include "opt_compat_freebsd.h"
   38 #include "opt_compat_linux.h"
   39 #include "opt_compat_ibcs2.h"
   40 #include "opt_compat_irix.h"
   41 #include "opt_compat_sunos.h"
   42 #include "opt_compat_hpux.h"
   43 #include "opt_compat_m68k4k.h"
   44 #include "opt_compat_mach.h"
   45 #include "opt_compat_darwin.h"
   46 #include "opt_compat_svr4.h"
   47 #include "opt_compat_netbsd32.h"
   48 #include "opt_compat_aout_m68k.h"
   49 #include "opt_compat_vax1k.h"
   50 #include "opt_compat_pecoff.h"
   51 #include "opt_compat_osf1.h"
   52 #include "opt_compat_ultrix.h"
   53 #include "opt_compat_netbsd.h"
   54 
   55 #include <sys/param.h>
   56 #include <sys/exec.h>
   57 #include <sys/signalvar.h>
   58 
   59 #ifdef EXEC_SCRIPT
   60 #include <sys/exec_script.h>
   61 #endif
   62 
   63 #ifdef EXEC_AOUT
   64 /*#include <sys/exec_aout.h> -- automatically pulled in */
   65 #endif
   66 
   67 #ifdef EXEC_COFF
   68 #include <sys/exec_coff.h>
   69 #endif
   70 
   71 #ifdef EXEC_ECOFF
   72 #include <sys/exec_ecoff.h>
   73 #endif
   74 
   75 #if defined(EXEC_ELF32) || defined(EXEC_ELF64)
   76 #include <sys/exec_elf.h>
   77 #define CONCAT(x,y)     __CONCAT(x,y)
   78 #define ELF32NAME(x)    CONCAT(elf,CONCAT(32,CONCAT(_,x)))
   79 #define ELF32NAME2(x,y) CONCAT(x,CONCAT(_elf32_,y))
   80 #define ELF64NAME(x)    CONCAT(elf,CONCAT(64,CONCAT(_,x)))
   81 #define ELF64NAME2(x,y) CONCAT(x,CONCAT(_elf64_,y))
   82 #ifdef EXEC_ELF32
   83 int ELF32NAME2(netbsd,probe)(struct proc *, struct exec_package *,
   84     void *, char *, vaddr_t *);
   85 #endif
   86 #ifdef EXEC_ELF64
   87 int ELF64NAME2(netbsd,probe)(struct proc *, struct exec_package *,
   88     void *, char *, vaddr_t *);
   89 #endif
   90 
   91 /*
   92  * Compatibility with old ELF binaries without NetBSD note.
   93  * Generic ELF executable kernel support was added in NetBSD 1.1.
   94  * The NetBSD note was introduced in NetBSD 1.3 together with initial
   95  * ELF shared library support.
   96  */
   97 #ifndef EXEC_ELF_NOTELESS
   98 #  if defined(COMPAT_11) || defined(COMPAT_12)
   99 #    define EXEC_ELF_NOTELESS           1
  100 #  endif
  101 #endif /* !EXEC_ELF_NOTELESS */
  102 
  103 #endif /* ELF32 || ELF64 */
  104 
  105 #ifdef EXEC_MACHO
  106 #include <sys/exec_macho.h>
  107 #endif
  108 
  109 #ifdef COMPAT_SUNOS
  110 #include <compat/sunos/sunos_exec.h>
  111 #endif
  112 
  113 #if defined(COMPAT_SVR4) || defined(COMPAT_SVR4_32)
  114 #include <compat/svr4/svr4_exec.h>
  115 #endif
  116 
  117 #ifdef COMPAT_SVR4_32
  118 #include <compat/svr4_32/svr4_32_exec.h>
  119 #endif
  120 
  121 #ifdef COMPAT_IBCS2
  122 #include <sys/exec_coff.h>
  123 #include <compat/ibcs2/ibcs2_exec.h>
  124 #include <machine/ibcs2_machdep.h>
  125 #endif
  126 
  127 #ifdef COMPAT_LINUX
  128 #include <compat/linux/common/linux_exec.h>
  129 #endif
  130 
  131 #ifdef COMPAT_DARWIN
  132 #include <compat/darwin/darwin_exec.h>
  133 #endif
  134 
  135 #ifdef COMPAT_FREEBSD
  136 #include <compat/freebsd/freebsd_exec.h>
  137 #endif
  138 
  139 #ifdef COMPAT_HPUX
  140 #include <compat/hpux/hpux_exec.h>
  141 #endif
  142 
  143 #ifdef COMPAT_M68K4K
  144 #include <compat/m68k4k/m68k4k_exec.h>
  145 #endif
  146 
  147 #ifdef COMPAT_MACH
  148 #include <compat/mach/mach_exec.h>
  149 #endif
  150 
  151 #ifdef COMPAT_IRIX
  152 #include <compat/irix/irix_exec.h>
  153 #endif
  154 
  155 #ifdef COMPAT_NETBSD32
  156 #include <compat/netbsd32/netbsd32_exec.h>
  157 #ifdef COMPAT_SUNOS
  158 #include <compat/sunos32/sunos32_exec.h>
  159 #endif
  160 #endif
  161 
  162 #ifdef COMPAT_VAX1K
  163 #include <compat/vax1k/vax1k_exec.h>
  164 #endif
  165 
  166 #ifdef COMPAT_PECOFF
  167 #include <sys/exec_coff.h>
  168 #include <compat/pecoff/pecoff_exec.h>
  169 #endif
  170 
  171 #ifdef COMPAT_OSF1
  172 #include <compat/osf1/osf1.h>
  173 #include <compat/osf1/osf1_exec.h>
  174 #endif
  175 
  176 #ifdef COMPAT_ULTRIX
  177 #include <compat/ultrix/ultrix_exec.h>
  178 #endif
  179 
  180 extern const struct emul emul_netbsd;
  181 #ifdef COMPAT_AOUT_M68K
  182 extern const struct emul emul_netbsd_aoutm68k;
  183 #endif
  184 
  185 const struct execsw execsw_builtin[] = {
  186 #ifdef EXEC_SCRIPT
  187         /* Shell scripts */
  188         { SCRIPT_HDR_SIZE,
  189           exec_script_makecmds,
  190           { NULL },
  191           NULL,
  192           EXECSW_PRIO_ANY,
  193           0,
  194           NULL,
  195           NULL,
  196           NULL,
  197           exec_setup_stack },
  198 #endif /* EXEC_SCRIPT */
  199 
  200 #ifdef EXEC_AOUT
  201 #ifdef COMPAT_NETBSD32
  202         /* 32-bit NetBSD a.out on 64-bit */
  203         { sizeof(struct netbsd32_exec),
  204           exec_netbsd32_makecmds,
  205           { NULL },
  206           &emul_netbsd32,
  207           EXECSW_PRIO_FIRST,
  208           0,
  209           netbsd32_copyargs,
  210           NULL,
  211           coredump_netbsd32,
  212           exec_setup_stack },
  213 #else /* !COMPAT_NETBSD32 */
  214 
  215         /* Native a.out */
  216         { sizeof(struct exec),
  217           exec_aout_makecmds,
  218           { NULL },
  219 #if defined(COMPAT_AOUT_M68K)
  220           &emul_netbsd_aoutm68k,
  221 #else
  222           &emul_netbsd,
  223 #endif
  224           EXECSW_PRIO_ANY,
  225           0,
  226           copyargs,
  227           NULL,
  228           coredump_netbsd,
  229           exec_setup_stack },
  230 #endif /* !COMPAT_NETBSD32 */
  231 #endif /* EXEC_AOUT */
  232 
  233 #ifdef EXEC_COFF
  234         /* Native COFF */
  235         { COFF_HDR_SIZE,
  236           exec_coff_makecmds,
  237           { NULL },
  238           &emul_netbsd,
  239           EXECSW_PRIO_ANY,
  240           0,
  241           copyargs,
  242           NULL,
  243           coredump_netbsd,
  244           exec_setup_stack },
  245 #endif /* EXEC_COFF */
  246 
  247 #ifdef EXEC_ECOFF
  248 #ifdef COMPAT_OSF1
  249         /* OSF/1 (Digital Unix) ECOFF */
  250         { ECOFF_HDR_SIZE,
  251           exec_ecoff_makecmds,
  252           { .ecoff_probe_func = osf1_exec_ecoff_probe },
  253           &emul_osf1,
  254           EXECSW_PRIO_ANY,
  255           howmany(OSF1_MAX_AUX_ENTRIES * sizeof (struct osf1_auxv) +
  256             2 * (MAXPATHLEN + 1), sizeof (char *)), /* exec & loader names */
  257           osf1_copyargs,
  258           cpu_exec_ecoff_setregs,
  259           coredump_netbsd,
  260           exec_setup_stack },
  261 #endif
  262 
  263         /* Native ECOFF */
  264         { ECOFF_HDR_SIZE,
  265           exec_ecoff_makecmds,
  266           { .ecoff_probe_func = cpu_exec_ecoff_probe },
  267           &emul_netbsd,
  268           EXECSW_PRIO_ANY,
  269           0,
  270           copyargs,
  271           cpu_exec_ecoff_setregs,
  272           coredump_netbsd,
  273           exec_setup_stack },
  274 
  275 #ifdef COMPAT_ULTRIX
  276         /* Ultrix ECOFF */
  277         { ECOFF_HDR_SIZE,
  278           exec_ecoff_makecmds,
  279           { .ecoff_probe_func = ultrix_exec_ecoff_probe },
  280           &emul_ultrix,
  281           EXECSW_PRIO_LAST, /* XXX probe func alw. succeeds */
  282           0,
  283           copyargs,
  284           cpu_exec_ecoff_setregs,
  285           coredump_netbsd,
  286           exec_setup_stack },
  287 #endif
  288 #endif /* EXEC_ECOFF */
  289 
  290 #ifdef EXEC_ELF32
  291 #ifdef COMPAT_NETBSD32
  292         /* Elf32 NetBSD on 64-bit */
  293         { sizeof (Elf32_Ehdr),
  294           exec_elf32_makecmds,
  295           { ELF32NAME2(netbsd32,probe) },
  296           &emul_netbsd32,
  297           EXECSW_PRIO_FIRST,
  298           howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
  299           netbsd32_elf32_copyargs,
  300           NULL,
  301           coredump_elf32,
  302           exec_setup_stack },           /* XXX XXX XXX */
  303           /* This one should go first so it matches instead of native */
  304 
  305 #ifdef COMPAT_SVR4_32
  306         /* SVR4 Elf32 on 64-bit */
  307         { sizeof (Elf32_Ehdr),
  308           exec_elf32_makecmds,
  309           { ELF32NAME2(svr4_32,probe) },
  310           &emul_svr4_32,
  311           EXECSW_PRIO_ANY,
  312           SVR4_32_AUX_ARGSIZ,
  313           svr4_32_copyargs,
  314           NULL,
  315           coredump_elf32,
  316           exec_setup_stack },   /* XXX XXX XXX */
  317           /* This one should go first so it matches instead of native */
  318 #endif
  319 
  320 #if 0
  321 #if EXEC_ELF_NOTELESS
  322         /* Generic compat Elf32 -- run as compat NetBSD Elf32 */
  323         { sizeof (Elf32_Ehdr),
  324           exec_elf32_makecmds,
  325           { ELF32NAME2(netbsd32,probe_noteless) },
  326           &emul_netbsd32,
  327           EXECSW_PRIO_FIRST,
  328           howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
  329           netbsd32_elf32_copyargs,
  330           NULL,
  331           coredump_elf32,
  332           exec_setup_stack },           /* XXX XXX XXX */
  333 #endif
  334 #endif
  335 #else /* !COMPAT_NETBSD32 */
  336 
  337         /* Native Elf32 */
  338         { sizeof (Elf32_Ehdr),
  339           exec_elf32_makecmds,
  340           { ELF32NAME2(netbsd,probe) },
  341           &emul_netbsd,
  342           EXECSW_PRIO_ANY,
  343           howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
  344           elf32_copyargs,
  345           NULL,
  346           coredump_elf32,
  347           exec_setup_stack },
  348 
  349 #ifdef COMPAT_FREEBSD
  350         /* FreeBSD Elf32 (probe not 64-bit safe) */
  351         { sizeof (Elf32_Ehdr),
  352           exec_elf32_makecmds,
  353           { ELF32NAME2(freebsd,probe) },
  354           &emul_freebsd,
  355           EXECSW_PRIO_ANY,
  356           howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof(Elf32_Addr)),
  357           elf32_copyargs,
  358           NULL,
  359           coredump_elf32,
  360           exec_setup_stack },
  361 #endif
  362 
  363 #ifdef COMPAT_LINUX
  364         /* Linux Elf32 */
  365         { sizeof (Elf32_Ehdr),
  366           exec_elf32_makecmds,
  367           { ELF32NAME2(linux,probe) },
  368           &emul_linux,
  369           EXECSW_PRIO_ANY,
  370           LINUX_ELF_AUX_ARGSIZ,
  371           linux_elf32_copyargs,
  372           NULL,
  373           coredump_elf32,
  374           linux_exec_setup_stack },
  375 #endif
  376 
  377 #ifdef COMPAT_IRIX
  378         /* IRIX Elf32 n32 ABI */
  379         { sizeof (Elf32_Ehdr),
  380           exec_elf32_makecmds,
  381           { ELF32NAME2(irix,probe_n32) },
  382           &emul_irix,
  383           EXECSW_PRIO_ANY,
  384           IRIX_AUX_ARGSIZ,
  385           irix_elf32_copyargs,
  386           irix_n32_setregs,
  387           coredump_elf32,
  388           exec_setup_stack },
  389 
  390         /* IRIX Elf32 o32 ABI */
  391         { sizeof (Elf32_Ehdr),
  392           exec_elf32_makecmds,
  393           { ELF32NAME2(irix,probe_o32) },
  394           &emul_irix,
  395           EXECSW_PRIO_ANY,
  396           IRIX_AUX_ARGSIZ,
  397           irix_elf32_copyargs,
  398           NULL,
  399           coredump_elf32,
  400           exec_setup_stack },
  401 #endif
  402 
  403 #ifdef COMPAT_SVR4
  404         /* SVR4 Elf32 */
  405         { sizeof (Elf32_Ehdr),
  406           exec_elf32_makecmds,
  407           { ELF32NAME2(svr4,probe) },
  408           &emul_svr4,
  409           EXECSW_PRIO_ANY,
  410           howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
  411           elf32_copyargs,
  412           NULL,
  413           coredump_elf32,
  414           exec_setup_stack },
  415 #endif
  416 
  417 #ifdef COMPAT_IBCS2
  418         /* SCO Elf32 */
  419         { sizeof (Elf32_Ehdr),
  420           exec_elf32_makecmds,
  421           { ELF32NAME2(ibcs2,probe) },
  422           &emul_ibcs2,
  423           EXECSW_PRIO_ANY,
  424           howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
  425           elf32_copyargs,
  426           NULL,
  427           coredump_elf32,
  428           exec_setup_stack },
  429 #endif
  430 
  431 #if EXEC_ELF_NOTELESS
  432         /* Generic Elf32 -- run at NetBSD Elf32 */
  433         { sizeof (Elf32_Ehdr),
  434           exec_elf32_makecmds,
  435           { NULL },
  436           &emul_netbsd,
  437           EXECSW_PRIO_LAST,
  438           howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
  439           elf32_copyargs,
  440           NULL,
  441           coredump_elf32,
  442           exec_setup_stack },
  443 #endif
  444 #endif /* !COMPAT_NETBSD32 */
  445 #endif /* EXEC_ELF32 */
  446 
  447 #ifdef EXEC_ELF64
  448         /* Native Elf64 */
  449         { sizeof (Elf64_Ehdr),
  450           exec_elf64_makecmds,
  451           { ELF64NAME2(netbsd,probe) },
  452           &emul_netbsd,
  453           EXECSW_PRIO_ANY,
  454           howmany(ELF_AUX_ENTRIES * sizeof(Aux64Info), sizeof (Elf64_Addr)),
  455           elf64_copyargs,
  456           NULL,
  457           coredump_elf64,
  458           exec_setup_stack },
  459 
  460 #ifdef COMPAT_LINUX
  461         /* Linux Elf64 */
  462         { sizeof (Elf64_Ehdr),
  463           exec_elf64_makecmds,
  464           { ELF64NAME2(linux,probe) },
  465           &emul_linux,
  466           EXECSW_PRIO_ANY,
  467           LINUX_ELF_AUX_ARGSIZ,
  468           linux_elf64_copyargs,
  469           NULL,
  470           coredump_elf64,
  471           exec_setup_stack },
  472 #endif
  473 
  474 #ifdef COMPAT_SVR4
  475         /* SVR4 Elf64 */
  476         { sizeof (Elf64_Ehdr),
  477           exec_elf64_makecmds,
  478           { ELF64NAME2(svr4,probe) },
  479           &emul_svr4,
  480           EXECSW_PRIO_ANY,
  481           howmany(ELF_AUX_ENTRIES * sizeof(Aux64Info), sizeof (Elf64_Addr)),
  482           elf64_copyargs,
  483           NULL,
  484           coredump_elf64,
  485           exec_setup_stack },
  486 #endif
  487 
  488 #if EXEC_ELF_NOTELESS
  489         /* Generic Elf64 -- run at NetBSD Elf64 */
  490         { sizeof (Elf64_Ehdr),
  491           exec_elf64_makecmds,
  492           { NULL },
  493           &emul_netbsd,
  494           EXECSW_PRIO_ANY,
  495           howmany(ELF_AUX_ENTRIES * sizeof(Aux64Info), sizeof (Elf64_Addr)),
  496           elf64_copyargs,
  497           NULL,
  498           coredump_elf64,
  499           exec_setup_stack },
  500 #endif
  501 #endif /* EXEC_ELF64 */
  502 
  503 #if defined(EXEC_MACHO)
  504 #ifdef COMPAT_DARWIN
  505         /* Darwin Mach-O (native word size) */
  506         { sizeof (struct exec_macho_fat_header),
  507           exec_macho_makecmds,
  508           { .mach_probe_func = exec_darwin_probe },
  509           &emul_darwin,
  510           EXECSW_PRIO_ANY,
  511           MAXPATHLEN + 1,
  512           exec_darwin_copyargs,
  513           NULL,
  514           coredump_netbsd,
  515           darwin_exec_setup_stack },
  516 #endif
  517 
  518 #ifdef COMPAT_MACH
  519         /* Mach MACH-O (native word size) */
  520         { sizeof (struct exec_macho_fat_header),
  521           exec_macho_makecmds,
  522           { .mach_probe_func = exec_mach_probe },
  523           &emul_mach,
  524           EXECSW_PRIO_ANY,
  525           MAXPATHLEN + 1,
  526           exec_mach_copyargs,
  527           NULL,
  528           coredump_netbsd,
  529           exec_setup_stack },
  530 #endif
  531 #endif /* EXEC_MACHO */
  532 
  533 #ifdef COMPAT_SUNOS
  534 #ifdef COMPAT_NETBSD32
  535         /* 32-bit SunOS a.out on 64-bit */
  536         { SUNOS32_AOUT_HDR_SIZE,
  537           exec_sunos32_aout_makecmds,
  538           { NULL },
  539           &emul_sunos,
  540           EXECSW_PRIO_ANY,
  541           0,
  542           netbsd32_copyargs,
  543           NULL,
  544           coredump_netbsd,
  545           exec_setup_stack },
  546 #else
  547         /* SunOS a.out (native word size) */
  548         { SUNOS_AOUT_HDR_SIZE,
  549           exec_sunos_aout_makecmds,
  550           { NULL },
  551           &emul_sunos,
  552           EXECSW_PRIO_ANY,
  553           0,
  554           copyargs,
  555           NULL,
  556           coredump_netbsd,
  557           exec_setup_stack },
  558 #endif
  559 #endif /* COMPAT_SUNOS */
  560 
  561 #if defined(COMPAT_LINUX) && defined(EXEC_AOUT)
  562         /* Linux a.out (native word size) */
  563         { LINUX_AOUT_HDR_SIZE,
  564           exec_linux_aout_makecmds,
  565           { NULL },
  566           &emul_linux,
  567           EXECSW_PRIO_ANY,
  568           LINUX_AOUT_AUX_ARGSIZ,
  569           linux_aout_copyargs,
  570           NULL,
  571           coredump_netbsd,
  572           linux_exec_setup_stack },
  573 #endif
  574 
  575 #ifdef COMPAT_IBCS2
  576         /* iBCS2 COFF (native word size) */
  577         { COFF_HDR_SIZE,
  578           exec_ibcs2_coff_makecmds,
  579           { NULL },
  580           &emul_ibcs2,
  581           EXECSW_PRIO_ANY,
  582           0,
  583           copyargs,
  584           NULL,
  585           coredump_netbsd,
  586           ibcs2_exec_setup_stack },
  587 
  588         /* iBCS2 x.out (native word size) */
  589         { XOUT_HDR_SIZE,
  590           exec_ibcs2_xout_makecmds,
  591           { NULL },
  592           &emul_ibcs2,
  593           EXECSW_PRIO_ANY,
  594           0,
  595           copyargs,
  596           NULL,
  597           coredump_netbsd,
  598           ibcs2_exec_setup_stack },
  599 #endif
  600 
  601 #if defined(COMPAT_FREEBSD) && defined(EXEC_AOUT)
  602         /* FreeBSD a.out (native word size) */
  603         { FREEBSD_AOUT_HDR_SIZE,
  604           exec_freebsd_aout_makecmds,
  605           { NULL },
  606           &emul_freebsd,
  607           EXECSW_PRIO_ANY,
  608           0,
  609           copyargs,
  610           NULL,
  611           coredump_netbsd,
  612           exec_setup_stack },
  613 #endif
  614 
  615 #ifdef COMPAT_HPUX
  616         /* HP-UX a.out for m68k (native word size) */
  617         { HPUX_EXEC_HDR_SIZE,
  618           exec_hpux_makecmds,
  619           { NULL },
  620           &emul_hpux,
  621           EXECSW_PRIO_ANY,
  622           0,
  623           copyargs,
  624           NULL,
  625           coredump_netbsd,
  626           exec_setup_stack },
  627 #endif
  628 
  629 #ifdef COMPAT_M68K4K
  630         /* NetBSD a.out for m68k4k */
  631         { sizeof(struct exec),
  632           exec_m68k4k_makecmds,
  633           { NULL },
  634           &emul_netbsd,
  635           EXECSW_PRIO_ANY,
  636           0,
  637           copyargs,
  638           NULL,
  639           coredump_netbsd,
  640           exec_setup_stack },
  641 #endif
  642 
  643 #ifdef COMPAT_VAX1K
  644         /* NetBSD vax1k a.out */
  645         { sizeof(struct exec),
  646           exec_vax1k_makecmds,
  647           { NULL },
  648           &emul_netbsd,
  649           EXECSW_PRIO_ANY,
  650           0,
  651           copyargs,
  652           NULL,
  653           coredump_netbsd,
  654           exec_setup_stack },
  655 #endif
  656 
  657 #ifdef COMPAT_PECOFF
  658         /* Win32/WinCE PE/COFF (native word size) */
  659         { PECOFF_HDR_SIZE,
  660           exec_pecoff_makecmds,
  661           { NULL },
  662           &emul_pecoff,
  663           EXECSW_PRIO_ANY,
  664           howmany(sizeof(struct pecoff_args), sizeof(char *)),
  665           pecoff_copyargs,
  666           NULL,
  667           coredump_netbsd,
  668           exec_setup_stack },
  669 #endif
  670 };
  671 int nexecs_builtin = (sizeof(execsw_builtin) / sizeof(struct execsw));

Cache object: e2ccb013e5547869206aa654e3bb112b


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.