/* <sgpsdef.h>
 *
 *	OBJFMT -- GSD entry - P-section definition in shareable image
 */
#ifndef _SGPSDEF_H
#define _SGPSDEF_H

#define SGPS$V_PIC	0
#define SGPS$V_LIB	1
#define SGPS$V_OVR	2
#define SGPS$V_REL	3
#define SGPS$V_GBL	4
#define SGPS$V_SHR	5
#define SGPS$V_EXE	6
#define SGPS$V_RD	7
#define SGPS$V_WRT	8
#define SGPS$V_VEC	9
#define SGPS$V_NOMOD	10
#define SGPS$V_COM	11
#define SGPS$M_PIC	(1<<SGPS$V_PIC)		/* 0x01 */
#define SGPS$M_LIB	(1<<SGPS$V_LIB)		/* 0x02 */
#define SGPS$M_OVR	(1<<SGPS$V_OVR)		/* 0x04 */
#define SGPS$M_REL	(1<<SGPS$V_REL)		/* 0x08 */
#define SGPS$M_GBL	(1<<SGPS$V_GBL)		/* 0x10 */
#define SGPS$M_SHR	(1<<SGPS$V_SHR)		/* 0x20 */
#define SGPS$M_EXE	(1<<SGPS$V_EXE)		/* 0x40 */
#define SGPS$M_RD	(1<<SGPS$V_RD)		/* 0x80 */
#define SGPS$M_WRT	(1<<SGPS$V_WRT)		/* 0x0100 */
#define SGPS$M_VEC	(1<<SGPS$V_VEC)		/* 0x0200 */
#define SGPS$M_NOMOD	(1<<SGPS$V_NOMOD)	/* 0x0400 */
#define SGPS$M_COM	(1<<SGPS$V_COM)		/* 0x0800 */
#define SGPS$K_NAME	13
#define SGPS$C_NAME	13
struct sgpsdef {
    unsigned char sgps$b_gsdtyp;	/* typ field */
    unsigned char sgps$b_align;		/* P-sect alignment */
    union {
	unsigned short sgps$w_flags;	/* P-sect flags */
	struct {
	    unsigned sgps$v_pic : 1;	/* position independent */
	    unsigned sgps$v_lib : 1;	/* from a shareable image */
	    unsigned sgps$v_ovr : 1;	/* overlaid memory allocation */
	    unsigned sgps$v_rel : 1;	/* relocatable */
	    unsigned sgps$v_gbl : 1;	/* global scope */
	    unsigned sgps$v_shr : 1;	/* shareable */
	    unsigned sgps$v_exe : 1;	/* executable */
	    unsigned sgps$v_rd	: 1;	/* readable */
	    unsigned sgps$v_wrt : 1;	/* writeable */
	    unsigned sgps$v_vec : 1;	/* vector psect */
	    unsigned sgps$v_nomod : 1;	/* not stored into */
	    unsigned sgps$v_com : 1;	/* associated with COMM sym */
	    unsigned		: 4;
	} sgps$r_flags_bits;
    } sgps$r_flags_overlay;
    unsigned long sgps$l_alloc;		/* length of this psect in shr image */
    unsigned long sgps$l_base;		/* base of this psect in shr image */
    unsigned char sgps$b_namlng;	/* length of p-sect name */
    char sgps$t_name[31];		/* name field */
};

#endif	/*_SGPSDEF_H*/
