/* <esgpsdef.h>
 *
 *	OBJFMT -- "EVAX" GSD entry - P-section definition in shareable image
 */
#ifndef _ESGPSDEF_H
#define _ESGPSDEF_H

#define ESGPS$V_PIC	0
#define ESGPS$V_LIB	1
#define ESGPS$V_OVR	2
#define ESGPS$V_REL	3
#define ESGPS$V_GBL	4
#define ESGPS$V_SHR	5
#define ESGPS$V_EXE	6
#define ESGPS$V_RD	7
#define ESGPS$V_WRT	8
#define ESGPS$V_VEC	9
#define ESGPS$V_NOMOD	10
#define ESGPS$V_COM	11
#define ESGPS$M_PIC	(1<<ESGPS$V_PIC)	/* 0x0001 */
#define ESGPS$M_LIB	(1<<ESGPS$V_LIB)	/* 0x0002 */
#define ESGPS$M_OVR	(1<<ESGPS$V_OVR)	/* 0x0004 */
#define ESGPS$M_REL	(1<<ESGPS$V_REL)	/* 0x0008 */
#define ESGPS$M_GBL	(1<<ESGPS$V_GBL)	/* 0x0010 */
#define ESGPS$M_SHR	(1<<ESGPS$V_SHR)	/* 0x0020 */
#define ESGPS$M_EXE	(1<<ESGPS$V_EXE)	/* 0x0040 */
#define ESGPS$M_RD	(1<<ESGPS$V_RD)		/* 0x0080 */
#define ESGPS$M_WRT	(1<<ESGPS$V_WRT)	/* 0x0100 */
#define ESGPS$M_VEC	(1<<ESGPS$V_VEC)	/* 0x0200 */
#define ESGPS$M_NOMOD	(1<<ESGPS$V_NOMOD)	/* 0x0400 */
#define ESGPS$M_COM	(1<<ESGPS$V_COM)	/* 0x0800 */
#define ESGPS$K_NAME	25
#define ESGPS$C_NAME	25
struct esgpsdef {
    unsigned short esgps$w_gsdtyp;	/* typ field */
    unsigned short esgps$w_size;	/* size of this ESGPS */
    unsigned char esgps$b_align;	/* p-sect alignment */
    unsigned char esgps$b_temp;		/* pad for allignment */
    union {
	unsigned short esgps$w_flags;	/* p-sect flags */
	struct {
	    unsigned esgps$v_pic   : 1; /* position independent */
	    unsigned esgps$v_lib   : 1; /* from a shareable image */
	    unsigned esgps$v_ovr   : 1; /* overlaid memory allocation */
	    unsigned esgps$v_rel   : 1; /* relocatable */
	    unsigned esgps$v_gbl   : 1; /* global scope */
	    unsigned esgps$v_shr   : 1; /* shareable */
	    unsigned esgps$v_exe   : 1; /* executable */
	    unsigned esgps$v_rd    : 1; /* readable */
	    unsigned esgps$v_wrt   : 1; /* writeable */
	    unsigned esgps$v_vec   : 1; /* vector psect */
	    unsigned esgps$v_nomod : 1; /* not stored into */
	    unsigned esgps$v_com   : 1; /* associated with COMM sym */
	    unsigned		   : 4;
	} esgps$r_flags_bits;
    } esgps$r_flags_overlay;
    unsigned long esgps$l_alloc;	/* length of this psect in shr image */
    unsigned long esgps$l_base;		/* offset into img of psect, copy of symbol vector */
    union {
	unsigned int esgps$q_value[2];
	unsigned long esgps$l_value;
    } esgps$r_value_overlay;
    unsigned char esgps$b_namlng;	/* length of p-sect name */
    char esgps$t_name [31];		/* name field */
};

#endif	/*_ESGPSDEF_H*/
