1*92ce8c6aSad /* $NetBSD: sunos_exec.h,v 1.11 2008/11/19 18:36:05 ad Exp $ */ 20a558b3fStv 30a558b3fStv /* 40a558b3fStv * Copyright (c) 1993 Theo de Raadt 50a558b3fStv * All rights reserved. 60a558b3fStv * 70a558b3fStv * Redistribution and use in source and binary forms, with or without 80a558b3fStv * modification, are permitted provided that the following conditions 90a558b3fStv * are met: 100a558b3fStv * 1. Redistributions of source code must retain the above copyright 110a558b3fStv * notice, this list of conditions and the following disclaimer. 120a558b3fStv * 2. Redistributions in binary form must reproduce the above copyright 130a558b3fStv * notice, this list of conditions and the following disclaimer in the 140a558b3fStv * documentation and/or other materials provided with the distribution. 150a558b3fStv * 3. The name of the author may not be used to endorse or promote products 160a558b3fStv * derived from this software without specific prior written permission 170a558b3fStv * 180a558b3fStv * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 190a558b3fStv * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 200a558b3fStv * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 210a558b3fStv * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 220a558b3fStv * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 230a558b3fStv * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 240a558b3fStv * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 250a558b3fStv * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 260a558b3fStv * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 270a558b3fStv * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 280a558b3fStv */ 290a558b3fStv 300a558b3fStv #ifndef _SUNOS_EXEC_H_ 310a558b3fStv #define _SUNOS_EXEC_H_ 320a558b3fStv 330a558b3fStv struct sunos_exec { 340a558b3fStv u_char a_dynamic:1; /* has a __DYNAMIC */ 350a558b3fStv u_char a_toolversion:7;/* version of toolset used to create this file */ 360a558b3fStv u_char a_machtype; /* machine type */ 370a558b3fStv u_short a_magic; /* magic number */ 380a558b3fStv }; 397eac246bSfredette #define SUNOS_M_68010 1 /* runs on 68010 and 68020 */ 400a558b3fStv #define SUNOS_M_68020 2 /* runs only on 68020 */ 410a558b3fStv #define SUNOS_M_SPARC 3 /* runs only on SPARC */ 420a558b3fStv 43fe3c14b6Smrg #ifdef __sparc__ 447eac246bSfredette #define SUNOS_M_NATIVE(m) ((m) == SUNOS_M_SPARC) 457eac246bSfredette #elif defined(__mc68010__) 467eac246bSfredette #define SUNOS_M_NATIVE(m) ((m) == SUNOS_M_68010) 470a558b3fStv #else 487eac246bSfredette #define SUNOS_M_NATIVE(m) ((m) == SUNOS_M_68010 || (m) == SUNOS_M_68020) 490a558b3fStv #endif 500a558b3fStv 510a558b3fStv #define SUNOS_AOUT_HDR_SIZE (sizeof(struct exec)) 520a558b3fStv 53*92ce8c6aSad extern struct emul emul_sunos; 547d7a448fSscw 55f2af9174Sdsl int exec_sunos_aout_makecmds(struct lwp *, struct exec_package *); 560a558b3fStv 570a558b3fStv #endif /* !_SUNOS_EXEC_H_ */ 58