[BACK]Return to hpux_exec.h CVS log [TXT][DIR] Up to [local] / sys / compat / hpux / m68k

Annotation of sys/compat/hpux/m68k/hpux_exec.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: hpux_exec.h,v 1.1 2004/07/09 21:33:45 mickey Exp $    */
        !             2: /*     $NetBSD: hpux_exec.h,v 1.7 1997/03/16 10:16:02 thorpej Exp $    */
        !             3:
        !             4: /*
        !             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 a.out header format
        !            48:  */
        !            49: struct hpux_exec {
        !            50:        long    ha_magic;       /* magic number */
        !            51:        short   ha_version;     /* version ID */
        !            52:        short   ha_shlhw;       /* shared lib "highwater" mark */
        !            53:        long    ha_misc;        /* misc. info */
        !            54:        long    ha_text;        /* size of text segment */
        !            55:        long    ha_data;        /* size of initialized data */
        !            56:        long    ha_bss;         /* size of uninitialized data */
        !            57:        long    ha_trsize;      /* size of text relocation */
        !            58:        long    ha_drsize;      /* size of data relocation */
        !            59:        long    ha_pascal;      /* pascal section size */
        !            60:        long    ha_symbols;     /* symbol table size */
        !            61:        long    ha_pad0;
        !            62:        long    ha_entry;       /* entry point */
        !            63:        long    ha_pad1;
        !            64:        long    ha_supsyms;     /* supplementary symbol table */
        !            65:        long    ha_drelocs;     /* non-PIC relocation info */
        !            66:        long    ha_extentions;  /* file offset of special extensions */
        !            67: };
        !            68:
        !            69: #define        HPUX_EXEC_HDR_SIZE      (sizeof(struct hpux_exec))
        !            70:
        !            71: #define        HPUX_MAGIC(ha)          ((ha)->ha_magic & 0xffff)
        !            72: #define        HPUX_SYSID(ha)          (((ha)->ha_magic >> 16) & 0xffff)
        !            73:
        !            74: /*
        !            75:  * Additional values for HPUX_MAGIC()
        !            76:  */
        !            77: #define        HPUX_MAGIC_RELOC        0x0106          /* relocatable object */
        !            78: #define HPUX_MAGIC_DL          0x010d          /* dynamic load library */
        !            79: #define        HPUX_MAGIC_SHL          0x010e          /* shared library */
        !            80:
        !            81: #define HPUX_LDPGSZ            4096            /* align to this */
        !            82: #define HPUX_LDPGSHIFT         12              /* log2(HPUX_LDPGSZ) */
        !            83:
        !            84: #define        HPUX_SEGMENT_ROUND(x)                                           \
        !            85:        (((x) + HPUX_LDPGSZ - 1) & ~(HPUX_LDPGSZ - 1))
        !            86:
        !            87: #define        HPUX_TXTOFF(x, m)                                               \
        !            88:        ((((m) == ZMAGIC) ||                                            \
        !            89:          ((m) == HPUX_MAGIC_SHL) ||                                    \
        !            90:          ((m) == HPUX_MAGIC_DL)) ?                                     \
        !            91:          HPUX_LDPGSZ : HPUX_EXEC_HDR_SIZE)
        !            92:
        !            93: #define        HPUX_DATAOFF(x, m)                                              \
        !            94:        ((((m) == ZMAGIC) ||                                            \
        !            95:          ((m) == HPUX_MAGIC_SHL) ||                                    \
        !            96:          ((m) == HPUX_MAGIC_DL)) ?                                     \
        !            97:          (HPUX_LDPGSZ + HPUX_SEGMENT_ROUND((x).ha_text)) :             \
        !            98:          (HPUX_EXEC_HDR_SIZE + (x).ha_text))
        !            99:
        !           100: #define        HPUX_PASOFF(x, m)                                               \
        !           101:        ((((m) == ZMAGIC) ||                                            \
        !           102:          ((m) == HPUX_MAGIC_SHL) ||                                    \
        !           103:          ((m) == HPUX_MAGIC_DL)) ?                                     \
        !           104:          (HPUX_LDPGSZ + HPUX_SEGMENT_ROUND((x).ha_text) +              \
        !           105:            HPUX_SEGMENT_ROUND((x).ha_data)) :                          \
        !           106:          (HPUX_EXEC_HDR_SIZE + (x).ha_text + (x).ha_data))
        !           107:
        !           108: #define        HPUX_SYMOFF(x, m)       (HPUX_PASOFF((x), (m)) + (x).ha_pascal)
        !           109: #define        HPUX_SUPSYMOFF(x, m)    (HPUX_SYMOFF((x), (m)) + (x).ha_symbols)
        !           110: #define        HPUX_RTEXTOFF(x, m)     (HPUX_SUPSYMOFF((x), (m)) + (x).ha_supsyms)
        !           111: #define        HPUX_RDATAOFF(x, m)     (HPUX_RTEXTOFF((x), (m)) + (x).ha_trsize)
        !           112: #define        HPUX_EXTOFF(x, m)       ((x).ha_extentions)
        !           113:
        !           114: #define        HPUXM_VALID     0x00000001
        !           115: #define HPUXM_STKWT    0x02000000
        !           116: #define HPUXM_DATAWT   0x04000000
        !           117:
        !           118: int    exec_hpux_makecmds(struct proc *, struct exec_package *);
        !           119:
        !           120: #endif /* _HPUX_EXEC_H_ */

CVSweb