Home | History | Annotate | Line # | Download | only in include
ecoff_machdep.h revision 1.1
      1  1.1  tsubai /*	$NetBSD: ecoff_machdep.h,v 1.1 1998/02/18 13:48:17 tsubai Exp $	*/
      2  1.1  tsubai 
      3  1.1  tsubai /*
      4  1.1  tsubai  * Copyright (c) 1997 Jonathan Stone
      5  1.1  tsubai  * All rights reserved.
      6  1.1  tsubai  *
      7  1.1  tsubai  * Copyright (c) 1994 Adam Glass
      8  1.1  tsubai  * All rights reserved.
      9  1.1  tsubai  *
     10  1.1  tsubai  * Redistribution and use in source and binary forms, with or without
     11  1.1  tsubai  * modification, are permitted provided that the following conditions
     12  1.1  tsubai  * are met:
     13  1.1  tsubai  * 1. Redistributions of source code must retain the above copyright
     14  1.1  tsubai  *    notice, this list of conditions and the following disclaimer.
     15  1.1  tsubai  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.1  tsubai  *    notice, this list of conditions and the following disclaimer in the
     17  1.1  tsubai  *    documentation and/or other materials provided with the distribution.
     18  1.1  tsubai  * 3. All advertising materials mentioning features or use of this software
     19  1.1  tsubai  *    must display the following acknowledgement:
     20  1.1  tsubai  *	This product includes software developed by Adam Glass.
     21  1.1  tsubai  * 4. The name of the Author may not be used to endorse or promote products
     22  1.1  tsubai  *    derived from this software without specific prior written permission.
     23  1.1  tsubai  *
     24  1.1  tsubai  * THIS SOFTWARE IS PROVIDED BY Adam Glass ``AS IS'' AND
     25  1.1  tsubai  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     26  1.1  tsubai  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     27  1.1  tsubai  * ARE DISCLAIMED.  IN NO EVENT SHALL Adam Glass BE LIABLE
     28  1.1  tsubai  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     29  1.1  tsubai  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     30  1.1  tsubai  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     31  1.1  tsubai  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     32  1.1  tsubai  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     33  1.1  tsubai  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     34  1.1  tsubai  * SUCH DAMAGE.
     35  1.1  tsubai  */
     36  1.1  tsubai 
     37  1.1  tsubai #define ECOFF_LDPGSZ 4096
     38  1.1  tsubai 
     39  1.1  tsubai #define ECOFF_PAD
     40  1.1  tsubai 
     41  1.1  tsubai #define ECOFF_MACHDEP \
     42  1.1  tsubai         u_long gprmask; \
     43  1.1  tsubai         u_long cprmask[4]; \
     44  1.1  tsubai         u_long gp_value
     45  1.1  tsubai 
     46  1.1  tsubai #define ECOFF_MAGIC_MIPSEB 0x0160
     47  1.1  tsubai #define ECOFF_MAGIC_MIPSEL 0x0162
     48  1.1  tsubai #define ECOFF_BADMAG(ep) ((ep)->f.f_magic != ECOFF_MAGIC_MIPSEB)
     49  1.1  tsubai 
     50  1.1  tsubai #define ECOFF_SEGMENT_ALIGNMENT(ep) ((ep)->a.vstamp < 23 ? 8 : 16)
     51  1.1  tsubai 
     52  1.1  tsubai extern void	cpu_exec_ecoff_setregs __P((
     53  1.1  tsubai     struct proc *, struct exec_package *, u_long));
     54  1.1  tsubai 
     55  1.1  tsubai 
     56  1.1  tsubai /*
     57  1.1  tsubai  * ECOFF symbol definitions for 32-bit mips.
     58  1.1  tsubai  * XXX 64-bit (mips3?) may be different.
     59  1.1  tsubai  */
     60  1.1  tsubai struct ecoff_symhdr {
     61  1.1  tsubai 	int16_t		magic;
     62  1.1  tsubai 	int16_t		vstamp;
     63  1.1  tsubai 	int32_t		ilineMax;
     64  1.1  tsubai 	int32_t		cbLine;
     65  1.1  tsubai 	int32_t		cbLineOffset;
     66  1.1  tsubai 	int32_t		idnMax;
     67  1.1  tsubai 	int32_t		cbDnOffset;
     68  1.1  tsubai 	int32_t		ipdMax;
     69  1.1  tsubai 	int32_t		cbPdOffset;
     70  1.1  tsubai 	int32_t		isymMax;
     71  1.1  tsubai 	int32_t		cbSymOffset;
     72  1.1  tsubai 	int32_t		ioptMax;
     73  1.1  tsubai 	int32_t		cbOptOffset;
     74  1.1  tsubai 	int32_t		iauxMax;
     75  1.1  tsubai 	int32_t		cbAuxOffset;
     76  1.1  tsubai 	int32_t		issMax;
     77  1.1  tsubai 	int32_t		cbSsOffset;
     78  1.1  tsubai 	int32_t		issExtMax;
     79  1.1  tsubai 	int32_t		cbSsExtOffset;
     80  1.1  tsubai 	int32_t		ifdMax;
     81  1.1  tsubai 	int32_t		cbFdOffset;
     82  1.1  tsubai 	int32_t		crfd;
     83  1.1  tsubai 	int32_t		cbRfdOffset;
     84  1.1  tsubai 	int32_t		iextMax;
     85  1.1  tsubai 	int32_t		cbExtOffset;
     86  1.1  tsubai };
     87  1.1  tsubai 
     88  1.1  tsubai /* Macro for field name used by cgd's Alpha-derived code */
     89  1.1  tsubai #define esymMax iextMax
     90  1.1  tsubai 
     91  1.1  tsubai 
     92  1.1  tsubai struct ecoff_extsym {
     93  1.1  tsubai 	u_int16_t	es_flags;
     94  1.1  tsubai 	u_int16_t	es_ifd;
     95  1.1  tsubai 	int32_t		es_strindex;
     96  1.1  tsubai 	int32_t		es_value;
     97  1.1  tsubai 	unsigned	es_type:6;
     98  1.1  tsubai 	unsigned	es_class:5;
     99  1.1  tsubai 	unsigned	:1;
    100  1.1  tsubai 	unsigned	es_symauxindex:20;
    101  1.1  tsubai };
    102  1.1  tsubai 
    103  1.1  tsubai 
    104