⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 internal.h

📁 早期freebsd实现
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Type of a symbol, in low N bits of the word */#define T_NULL		0#define T_VOID		1	/* function argument (only used by compiler) */#define T_CHAR		2	/* character		*/#define T_SHORT		3	/* short integer	*/#define T_INT		4	/* integer		*/#define T_LONG		5	/* long integer		*/#define T_FLOAT		6	/* floating point	*/#define T_DOUBLE	7	/* double word		*/#define T_STRUCT	8	/* structure 		*/#define T_UNION		9	/* union 		*/#define T_ENUM		10	/* enumeration 		*/#define T_MOE		11	/* member of enumeration*/#define T_UCHAR		12	/* unsigned character	*/#define T_USHORT	13	/* unsigned short	*/#define T_UINT		14	/* unsigned integer	*/#define T_ULONG		15	/* unsigned long	*/#define T_LNGDBL	16	/* long double		*//* * derived types, in n_type*/#define DT_NON		(0)	/* no derived type */#define DT_PTR		(1)	/* pointer */#define DT_FCN		(2)	/* function */#define DT_ARY		(3)	/* array */#define BTYPE(x)	((x) & N_BTMASK)#define ISPTR(x)	(((x) & N_TMASK) == (DT_PTR << N_BTSHFT))#define ISFCN(x)	(((x) & N_TMASK) == (DT_FCN << N_BTSHFT))#define ISARY(x)	(((x) & N_TMASK) == (DT_ARY << N_BTSHFT))#define ISTAG(x)	((x)==C_STRTAG||(x)==C_UNTAG||(x)==C_ENTAG)#define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))union internal_auxent {  struct {    union {      long l;			/* str, un, or enum tag indx */      struct coff_ptr_struct *p;    } x_tagndx;    union {      struct {	unsigned short x_lnno;	/* declaration line number */	unsigned short x_size;	/* str/union/array size */      } x_lnsz;      long x_fsize;		/* size of function */    } x_misc;    union {      struct {			/* if ISFCN, tag, or .bb */	long x_lnnoptr;		/* ptr to fcn line # */	union { 		/* entry ndx past block end */	  long  l;	  struct coff_ptr_struct *p;	} x_endndx;      } x_fcn;      struct {			/* if ISARY, up to 4 dimen. */	unsigned short x_dimen[DIMNUM];      } x_ary;    } x_fcnary;    unsigned short x_tvndx;	/* tv index */  } x_sym;  union {    char x_fname[FILNMLEN];    struct {      long x_zeroes;      long x_offset;    } x_n;  } x_file;  struct {    long x_scnlen;		/* section length */    unsigned short x_nreloc;	/* # relocation entries */    unsigned short x_nlinno;	/* # line numbers */  } x_scn;  struct {    long		x_tvfill; /* tv fill value */    unsigned short	x_tvlen; /* length of .tv */    unsigned short	x_tvran[2]; /* tv range */  } x_tv;		/* info about .tv section (in auxent of symbol .tv)) */  /******************************************   * RS/6000-specific auxent - last auxent for every external symbol   ******************************************/  struct {    long            x_scnlen;       /* csect length */    long            x_parmhash;     /* parm type hash index */    unsigned short  x_snhash;       /* sect num with parm hash */    unsigned char   x_smtyp;        /* symbol align and type */				    /* 0-4 - Log 2 of alignment */				    /* 5-7 - symbol type */    unsigned char   x_smclas;       /* storage mapping class */    long            x_stab;         /* dbx stab info index */    unsigned short  x_snstab;       /* sect num with dbx stab */  } x_csect; /* csect definition information *//* x_smtyp values:  */#define	SMTYP_ALIGN(x)	((x) >> 3)	/* log2 of alignment */#define	SMTYP_SMTYP(x)	((x) & 0x7)	/* symbol type *//* Symbol type values:  */#define	XTY_ER	0	/* External reference */#define	XTY_SD	1	/* Csect definition */#define	XTY_LD	2	/* Label definition */#define XTY_CM	3	/* .BSS */#define	XTY_EM	4	/* Error message */#define	XTY_US	5	/* "Reserved for internal use" *//* x_smclas values:  */#define	XMC_PR	0	/* Read-only program code */#define	XMC_RO	1	/* Read-only constant */#define	XMC_DB	2	/* Read-only debug dictionary table */#define	XMC_TC	3	/* Read-write general TOC entry */#define	XMC_UA	4	/* Read-write unclassified */#define	XMC_RW	5	/* Read-write data */#define	XMC_GL	6	/* Read-only global linkage */#define	XMC_XO	7	/* Read-only extended operation (simulated insn) */#define	XMC_SV	8	/* Read-only supervisor call */#define	XMC_BS	9	/* Read-write BSS */#define	XMC_DS	10	/* Read-write descriptor csect */#define	XMC_UC	11	/* Read-write unnamed Fortran common */#define	XMC_TI	12	/* Read-only traceback index csect */#define	XMC_TB	13	/* Read-only traceback table csect *//* 		14	??? */#define	XMC_TC0	15	/* Read-write TOC anchor for TOC addressability */  /******************************************   *  I960-specific *2nd* aux. entry formats   ******************************************/  struct {    /* This is a very old typo that keeps getting propagated. */#define x_stdindx x_stindx    long x_stindx;		/* sys. table entry */  } x_sc;			/* system call entry */  struct {    unsigned long x_balntry;	/* BAL entry point */  } x_bal;			/* BAL-callable function */  struct {    unsigned long	x_timestamp; /* time stamp */    char 	x_idstring[20];	/* producer identity string */  } x_ident;			/* Producer ident info */};/********************** RELOCATION DIRECTIVES **********************/struct internal_reloc {	long r_vaddr;		/* Virtual address of reference */	long r_symndx;		/* Index into symbol table	*/	unsigned short r_type;	/* Relocation type		*/#if RS6000COFF_C	unsigned char  r_size;#endif	unsigned short r_offset;};#define R_RELBYTE	017#define R_RELWORD	020#define R_PCRBYTE	022#define R_PCRWORD	023#define R_PCRLONG	024#define R_DIR32		06#define	R_PCLONG	020#define R_RELBYTE	017#define R_RELWORD	020#define R_PCR16L 128#define R_PCR26L 129#define R_VRT16  130#define R_HVRT16 131#define R_LVRT16 132#define R_VRT32  133#define R_RELLONG	(0x11)	/* Direct 32-bit relocation */#define R_IPRSHORT	(0x18)#define R_IPRMED 	(0x19)	/* 24-bit ip-relative relocation */#define R_IPRLONG	(0x1a)#define R_OPTCALL	(0x1b)	/* 32-bit optimizable call (leafproc/sysproc) */#define R_OPTCALLX	(0x1c)	/* 64-bit optimizable call (leafproc/sysproc) */#define R_GETSEG	(0x1d)#define R_GETPA		(0x1e)#define R_TAGWORD	(0x1f)#define R_JUMPTARG	0x20	/* strange 29k 00xx00xx reloc */#define R_MOVB1    0x41    /* Special h8 16bit or 8 bit reloc for  mov.b */#define R_MOVB2    0x42    /* Special h8 opcode for 8bit which could			      be 16 */#define R_JMP1     0x43    /* Special h8 16bit jmp which could be			      pcrel */#define R_JMP2 0x44 /* a branch which used to be a jmp */#define R_RELLONG_NEG  0x45/* Z8k modes */#define R_DA	  0x01	/* 16 bit Absolute direct address */#define R_JR	  0x02	/* jr  8 bit disp */#define R_IMM4L   0x23  /* low nibble */#define R_CALL    R_DA /* Absolute address which could be a callr */#define R_JP	  R_DA  /* Absolute address which could be a jp */#define R_REL16   0x04  /* 16 bit PC rel */#define R_CALLR	  0x05	/* callr 12 bit disp */#define R_SEG     0x10  /* set if in segmented mode */#define R_IMM32   0x21  /* 32 bit abs */#define R_IMM8    0x22  /* 8 bit abs */#define R_IMM4H   0x24  /* high nibble */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -