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

📄 internal.h

📁 这个是LINUX下的GDB调度工具的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
struct internal_syment{  union  {    char _n_name[SYMNMLEN];	/* old COFF version	*/    struct    {      long _n_zeroes;		/* new == 0		*/      long _n_offset;		/* offset into string table */    }      _n_n;    char *_n_nptr[2];		/* allows for overlaying	*/  }     _n;  bfd_vma n_value;			/* value of symbol		*/  short n_scnum;		/* section number		*/  unsigned short n_flags;	/* copy of flags from filhdr	*/  unsigned short n_type;	/* type and derived type	*/  unsigned char n_sclass;	/* storage class		*/  unsigned char n_numaux;	/* number of aux. entries	*/};#define n_name		_n._n_name#define n_zeroes	_n._n_n._n_zeroes#define n_offset	_n._n_n._n_offset/* Relocatable symbols have number of the section in which they are defined,   or one of the following:  */#define N_UNDEF	((short)0)	/* undefined symbol */#define N_ABS	((short)-1)	/* value of symbol is absolute */#define N_DEBUG	((short)-2)	/* debugging symbol -- value is meaningless */#define N_TV	((short)-3)	/* indicates symbol needs preload transfer vector */#define P_TV	((short)-4)	/* indicates symbol needs postload transfer vector*//* 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 DTYPE(x)	(((x) & N_TMASK) >> N_BTSHFT)#define ISPTR(x) \  (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_PTR << N_BTSHFT))#define ISFCN(x) \  (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_FCN << N_BTSHFT))#define ISARY(x) \  (((unsigned long) (x) & N_TMASK) == ((unsigned long) 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 */	bfd_signed_vma 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 */    unsigned long x_checksum;	/* section COMDAT checksum for PE */    unsigned short x_associated; /* COMDAT associated section index for PE */    unsigned char x_comdat;	/* COMDAT selection number for PE */  }      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  {    union      {				/* csect length or enclosing csect */	bfd_signed_vma l;	struct coff_ptr_struct *p;      } x_scnlen;    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 */#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 */#define XMC_TD	16		/* Read-write data in TOC */  /******************************************   *  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{  bfd_vma r_vaddr;		/* Virtual address of reference */  long r_symndx;		/* Index into symbol table	*/  unsigned short r_type;	/* Relocation type		*/  unsigned char r_size;		/* Used by RS/6000 and ECOFF	*/  unsigned char r_extern;	/* Used by ECOFF		*/  unsigned long r_offset;	/* Used by Alpha ECOFF, SPARC, others */};#define R_DIR16 	 1#define R_REL24          5#define R_DIR32 	 6#define R_IMAGEBASE	 7#define R_SECREL32	11#define R_RELBYTE	15#define R_RELWORD	16#define R_RELLONG	17#define R_PCRBYTE	18#define R_PCRWORD	19#define R_PCRLONG	20#define R_PCR24         21#define R_IPRSHORT	24#define R_IPRLONG	26#define R_GETSEG	29#define R_GETPA 	30#define R_TAGWORD	31#define R_JUMPTARG	32	/* strange 29k 00xx00xx reloc */#define R_PARTLS16      32#define R_PARTMS8       33#define R_PCR16L       128#define R_PCR26L       129#define R_VRT16        130#define R_HVRT16       131#define R_LVRT16       132#define R_VRT32        133/* This reloc identifies mov.b instructions with a 16bit absolute   address.  The linker tries to turn insns with this reloc into   an absolute 8-bit address.  */#define R_MOV16B1    	0x41/* This reloc identifies mov.b instructions which had a 16bit   absolute address which have been shortened into a 8-bit   absolute address.  */#define R_MOV16B2 	0x42/* This reloc identifies jmp insns with a 16bit target address;   the linker tries to turn these insns into bra insns with   an 8bit pc-relative target.  */#define R_JMP1     	0x43/* This reloc identifies a bra with an 8-bit pc-relative   target that was formerly a jmp insn with a 16bit target.  */#define R_JMP2 		0x44/* ??? */#define R_RELLONG_NEG  	0x45/* This reloc identifies jmp insns with a 24bit target address;   the linker tries to turn these insns into bra insns with   an 8bit pc-relative target.  */#define R_JMPL1     	0x46/* This reloc identifies a bra with an 8-bit pc-relative   target that was formerly a jmp insn with a 24bit target.  */#define R_JMPL2		0x47/* This reloc identifies mov.b instructions with a 24bit absolute   address.  The linker tries to turn insns with this reloc into   an absolute 8-bit address.  */#define R_MOV24B1    	0x48/* This reloc identifies mov.b instructions which had a 24bit   absolute address which have been shortened into a 8-bit   absolute address.  */#define R_MOV24B2 	0x49/* An h8300 memory indirect jump/call.  Forces the address of the jump/call   target into the function vector (in page zero), and the address of the   vector entry to be placed in the jump/call instruction.  */#define R_MEM_INDIRECT	0x4a/* This reloc identifies a 16bit pc-relative branch target which was   shortened into an 8bit pc-relative branch target.  */#define R_PCRWORD_B	0x4b/* This reloc identifies mov.[wl] instructions with a 32/24 bit   absolute address; the linker may turn this into a mov.[wl]   insn with a 16bit absolute address.  */#define R_MOVL1    	0x4c/* This reloc identifies mov.[wl] insns which formerly had   a 32/24bit absolute address and now have a 16bit absolute address.  */#define R_MOVL2 	0x4d/* This reloc identifies a bCC:8 which will have it's condition   inverted and its target redirected to the target of the branch   in the following insn.  */#define R_BCC_INV	0x4e/* This reloc identifies a jmp instruction that has been deleted.  */#define R_JMP_DEL	0x4f/* Z8k modes */#define R_IMM16   0x01		/* 16 bit abs */#define R_JR	  0x02		/* jr  8 bit disp */#define R_IMM4L   0x23		/* low nibble */#define R_IMM8    0x22		/* 8 bit abs */#define R_IMM32   R_RELLONG	/* 32 bit abs */#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_IMM4H   0x24		/* high nibble */#define R_DISP7   0x25          /* djnz displacement *//* H8500 modes */#define R_H8500_IMM8  	1		/*  8 bit immediate 	*/#define R_H8500_IMM16 	2		/* 16 bit immediate	*/#define R_H8500_PCREL8 	3		/*  8 bit pcrel 	*/#define R_H8500_PCREL16 4		/* 16 bit pcrel 	*/#define R_H8500_HIGH8  	5		/* high 8 bits of 24 bit address */#define R_H8500_LOW16 	7		/* low 16 bits of 24 bit immediate */#define R_H8500_IMM24	6		/* 24 bit immediate */#define R_H8500_IMM32   8               /* 32 bit immediate */#define R_H8500_HIGH16  9		/* high 16 bits of 32 bit immediate *//* W65 modes */#define R_W65_ABS8	1  /* addr & 0xff 		*/#define R_W65_ABS16	2  /* addr & 0xffff 		*/#define R_W65_ABS24	3  /* addr & 0xffffff 		*/#define R_W65_ABS8S8    4  /* (addr >> 8) & 0xff 	*/#define R_W65_ABS8S16   5  /* (addr >> 16) & 0xff 	*/#define R_W65_ABS16S8   6  /* (addr >> 8) & 0ffff 	*/#define R_W65_ABS16S16  7  /* (addr >> 16) & 0ffff 	*/#define R_W65_PCR8	8#define R_W65_PCR16	9#define R_W65_DP       10  /* direct page 8 bits only   */#endif /* GNU_COFF_INTERNAL_H */

⌨️ 快捷键说明

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