Annotation of sys/compat/hpux/hppa/hpux_exec.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: hpux_exec.h,v 1.1 2004/07/09 21:48:21 mickey Exp $ */
! 2:
! 3: /*
! 4: * Copyright (c) 2004 Michael Shalayeff. All rights reserved.
! 5: * Copyright (c) 1995 Jason R. Thorpe. All rights reserved.
! 6: * Copyright (c) 1988 University of Utah.
! 7: * Copyright (c) 1990, 1993
! 8: * The Regents of the University of California. All rights reserved.
! 9: *
! 10: * This code is derived from software contributed to Berkeley by
! 11: * the Systems Programming Group of the University of Utah Computer
! 12: * Science Department.
! 13: *
! 14: * Redistribution and use in source and binary forms, with or without
! 15: * modification, are permitted provided that the following conditions
! 16: * are met:
! 17: * 1. Redistributions of source code must retain the above copyright
! 18: * notice, this list of conditions and the following disclaimer.
! 19: * 2. Redistributions in binary form must reproduce the above copyright
! 20: * notice, this list of conditions and the following disclaimer in the
! 21: * documentation and/or other materials provided with the distribution.
! 22: * 3. Neither the name of the University nor the names of its contributors
! 23: * may be used to endorse or promote products derived from this software
! 24: * without specific prior written permission.
! 25: *
! 26: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
! 27: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 28: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 29: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
! 30: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 31: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 32: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 33: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 34: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 35: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 36: * SUCH DAMAGE.
! 37: *
! 38: * from: Utah $Hdr: hpux_exec.h 1.6 92/01/20$
! 39: *
! 40: * @(#)hpux_exec.h 8.1 (Berkeley) 6/10/93
! 41: */
! 42:
! 43: #ifndef _HPUX_EXEC_H_
! 44: #define _HPUX_EXEC_H_
! 45:
! 46: /*
! 47: * HPUX SOM header format
! 48: */
! 49: struct som_exec {
! 50: long ha_magic;
! 51: long som_version;
! 52: struct timespec som_time;
! 53: long som_ep_space;
! 54: long som_ep_subspace;
! 55: long som_ep_offset;
! 56: long som_auxhdr;
! 57: long som_auxsize;
! 58: long pad[22]; /* there is more but we do not care */
! 59: long som_cksum;
! 60: };
! 61:
! 62: struct som_aux {
! 63: long som_flags;
! 64: long som_length; /* of the rest */
! 65: long som_tsize; /* .text size */
! 66: long som_tmem; /* .text address */
! 67: long som_tfile; /* .text offset in file */
! 68: long som_dsize;
! 69: long som_dmem;
! 70: long som_dfile;
! 71: long som_bsize;
! 72: long som_entry;
! 73: long som_ldflags;
! 74: long som_bfill;
! 75: };
! 76:
! 77: #define HPUX_EXEC_HDR_SIZE \
! 78: (sizeof(struct som_exec) + sizeof(struct som_aux))
! 79:
! 80: #define HPUX_MAGIC(ha) ((ha)->ha_magic & 0xffff)
! 81: #define HPUX_SYSID(ha) (((ha)->ha_magic >> 16) & 0xffff)
! 82:
! 83: /*
! 84: * Additional values for HPUX_MAGIC()
! 85: */
! 86: #define HPUX_MAGIC_RELOC 0x0106 /* relocatable object */
! 87: #define HPUX_MAGIC_DL 0x010d /* dynamic load library */
! 88: #define HPUX_MAGIC_SHL 0x010e /* shared library */
! 89:
! 90: #define HPUX_SOM_V0 85082112
! 91: #define HPUX_SOM_V1 87102412
! 92:
! 93: #define HPUX_LDPGSZ 4096 /* align to this */
! 94: #define HPUX_LDPGSHIFT 12 /* log2(HPUX_LDPGSZ) */
! 95:
! 96: int exec_hpux_makecmds(struct proc *, struct exec_package *);
! 97:
! 98: #endif /* _HPUX_EXEC_H_ */
CVSweb