common.h

来自「基于4个mips核的noc设计」· C头文件 代码 · 共 606 行 · 第 1/2 页

H
606
字号
#define SHF_MASKPROC	0xF0000000	/* Processor-specific semantics *//* Values of note segment descriptor types for core files.  */#define NT_PRSTATUS	1		/* Contains copy of prstatus struct */#define NT_FPREGSET	2		/* Contains copy of fpregset struct */#define NT_PRPSINFO	3		/* Contains copy of prpsinfo struct */#define NT_TASKSTRUCT	4		/* Contains copy of task struct */#define NT_PRXFPREG     0x46e62b7f	/* Contains a user_xfpregs_struct; */					/*   note name must be "LINUX".  *//* Note segments for core files on dir-style procfs systems.  */#define NT_PSTATUS	10		/* Has a struct pstatus */#define NT_FPREGS	12		/* Has a struct fpregset */#define NT_PSINFO	13		/* Has a struct psinfo */#define NT_LWPSTATUS	16		/* Has a struct lwpstatus_t */#define NT_LWPSINFO	17		/* Has a struct lwpsinfo_t */#define NT_WIN32PSTATUS	18		/* Has a struct win32_pstatus *//* Values of note segment descriptor types for object files.  *//* (Only for hppa right now.  Should this be moved elsewhere?)  */#define NT_VERSION	1		/* Contains a version string.  *//* These three macros disassemble and assemble a symbol table st_info field,   which contains the symbol binding and symbol type.  The STB_ and STT_   defines identify the binding and type.  */#define ELF_ST_BIND(val)		(((unsigned int)(val)) >> 4)#define ELF_ST_TYPE(val)		((val) & 0xF)#define ELF_ST_INFO(bind,type)		(((bind) << 4) + ((type) & 0xF))/* The 64bit and 32bit versions of these macros are identical, but   the ELF spec defines them, so here they are.  */#define ELF32_ST_BIND  ELF_ST_BIND#define ELF32_ST_TYPE  ELF_ST_TYPE#define ELF32_ST_INFO  ELF_ST_INFO#define ELF64_ST_BIND  ELF_ST_BIND#define ELF64_ST_TYPE  ELF_ST_TYPE#define ELF64_ST_INFO  ELF_ST_INFO/* This macro disassembles and assembles a symbol's visibility into   the st_other field.  The STV_ defines specificy the actual visibility.  */#define ELF_ST_VISIBILITY(v)		((v) & 0x3)/* The remaining bits in the st_other field are not currently used.   They should be set to zero.  */#define ELF32_ST_VISIBILITY  ELF_ST_VISIBILITY#define ELF64_ST_VISIBILITY  ELF_ST_VISIBILITY#define STN_UNDEF	0		/* Undefined symbol index */#define STB_LOCAL	0		/* Symbol not visible outside obj */#define STB_GLOBAL	1		/* Symbol visible outside obj */#define STB_WEAK	2		/* Like globals, lower precedence */#define STB_LOOS        10		/* OS-specific semantics */#define STB_HIOS        12		/* OS-specific semantics */#define STB_LOPROC	13		/* Application-specific semantics */#define STB_HIPROC	15		/* Application-specific semantics */#define STT_NOTYPE	0		/* Symbol type is unspecified */#define STT_OBJECT	1		/* Symbol is a data object */#define STT_FUNC	2		/* Symbol is a code object */#define STT_SECTION	3		/* Symbol associated with a section */#define STT_FILE	4		/* Symbol gives a file name */#define STT_COMMON	5		/* An uninitialised common block */#define STT_LOOS        10		/* OS-specific semantics */#define STT_HIOS        12		/* OS-specific semantics */#define STT_LOPROC	13		/* Application-specific semantics */#define STT_HIPROC	15		/* Application-specific semantics *//* Special section indices, which may show up in st_shndx fields, among   other places.  */#define SHN_UNDEF	0		/* Undefined section reference */#define SHN_LORESERVE	0xFF00		/* Begin range of reserved indices */#define SHN_LOPROC	0xFF00		/* Begin range of appl-specific */#define SHN_HIPROC	0xFF1F		/* End range of appl-specific */#define SHN_LOOS        0xFF20		/* OS specific semantics, lo */#define SHN_HIOS        0xFF3F		/* OS specific semantics, hi */#define SHN_ABS	        0xFFF1		/* Associated symbol is absolute */#define SHN_COMMON      0xFFF2		/* Associated symbol is in common */#define SHN_XINDEX      0xFFFF		/* Section index it held elsewhere */#define SHN_HIRESERVE   0xFFFF		/* End range of reserved indices *//* The following constants control how a symbol may be accessed once it has   become part of an executable or shared library.  */					   #define STV_DEFAULT	0		/* Visibility is specified by binding type */#define STV_INTERNAL	1		/* OS specific version of STV_HIDDEN */#define STV_HIDDEN	2		/* Can only be seen inside currect component */#define STV_PROTECTED	3		/* Treat as STB_LOCAL inside current component *//* Relocation info handling macros.  */#define ELF32_R_SYM(i)		((i) >> 8)#define ELF32_R_TYPE(i)		((i) & 0xff)#define ELF32_R_INFO(s,t)	(((s) << 8) + ((t) & 0xff))#define ELF64_R_SYM(i)		((i) >> 32)#define ELF64_R_TYPE(i)		((i) & 0xffffffff)#define ELF64_R_INFO(s,t)	(((bfd_vma) (s) << 32) + (bfd_vma) (t))/* Dynamic section tags.  */#define DT_NULL		0#define DT_NEEDED	1#define DT_PLTRELSZ	2#define DT_PLTGOT	3#define DT_HASH		4#define DT_STRTAB	5#define DT_SYMTAB	6#define DT_RELA		7#define DT_RELASZ	8#define DT_RELAENT	9#define DT_STRSZ	10#define DT_SYMENT	11#define DT_INIT		12#define DT_FINI		13#define DT_SONAME	14#define DT_RPATH	15#define DT_SYMBOLIC	16#define DT_REL		17#define DT_RELSZ	18#define DT_RELENT	19#define DT_PLTREL	20#define DT_DEBUG	21#define DT_TEXTREL	22#define DT_JMPREL	23#define DT_BIND_NOW     24#define DT_INIT_ARRAY   25#define DT_FINI_ARRAY   26#define DT_INIT_ARRAYSZ 27#define DT_FINI_ARRAYSZ 28#define DT_RUNPATH      29#define DT_FLAGS        30#define DT_ENCODING     32#define DT_PREINIT_ARRAY   32#define DT_PREINIT_ARRAYSZ 33/* Note, the Oct 4, 1999 draft of the ELF ABI changed the values   for DT_LOOS and DT_HIOS.  Some implementations however, use   values outside of the new range (see below).  */#define OLD_DT_LOOS	0x60000000#define DT_LOOS         0x6000000d#define DT_HIOS         0x6fff0000#define OLD_DT_HIOS     0x6fffffff#define DT_LOPROC       0x70000000#define DT_HIPROC       0x7fffffff/* The next four dynamic tags are used on Solaris.  We support them   everywhere.  Note these values lie outside of the (new) range for   OS specific values.  This is a deliberate special case and we   maintain it for backwards compatability.  */#define DT_VALRNGLO	0x6ffffd00#define DT_CHECKSUM	0x6ffffdf8#define DT_PLTPADSZ	0x6ffffdf9#define DT_MOVEENT	0x6ffffdfa#define DT_MOVESZ	0x6ffffdfb#define DT_FEATURE	0x6ffffdfc#define DT_POSFLAG_1	0x6ffffdfd#define DT_SYMINSZ	0x6ffffdfe#define DT_SYMINENT	0x6ffffdff#define DT_VALRNGHI	0x6ffffdff#define DT_ADDRRNGLO	0x6ffffe00#define DT_CONFIG	0x6ffffefa#define DT_DEPAUDIT	0x6ffffefb#define DT_AUDIT	0x6ffffefc#define DT_PLTPAD	0x6ffffefd#define DT_MOVETAB	0x6ffffefe#define DT_SYMINFO	0x6ffffeff#define DT_ADDRRNGHI	0x6ffffeff#define DT_RELACOUNT	0x6ffffff9#define DT_RELCOUNT	0x6ffffffa#define DT_FLAGS_1	0x6ffffffb#define DT_VERDEF	0x6ffffffc#define DT_VERDEFNUM	0x6ffffffd#define DT_VERNEED	0x6ffffffe#define DT_VERNEEDNUM	0x6fffffff/* This tag is a GNU extension to the Solaris version scheme.  */#define DT_VERSYM	0x6ffffff0#define DT_LOPROC	0x70000000#define DT_HIPROC	0x7fffffff/* These section tags are used on Solaris.  We support them   everywhere, and hope they do not conflict.  */#define DT_AUXILIARY	0x7ffffffd#define DT_USED		0x7ffffffe#define DT_FILTER	0x7fffffff/* Values used in DT_FEATURE .dynamic entry.  */#define DTF_1_PARINIT	0x00000001/* From   http://docs.sun.com:80/ab2/coll.45.13/LLM/@Ab2PageView/21165?Ab2Lang=C&Ab2Enc=iso-8859-1   DTF_1_CONFEXP is the same as DTF_1_PARINIT. It is a typo. The value   defined here is the same as the one in <sys/link.h> on Solaris 8.  */#define DTF_1_CONFEXP	0x00000002/* Flag values used in the DT_POSFLAG_1 .dynamic entry.  */#define DF_P1_LAZYLOAD	0x00000001#define DF_P1_GROUPPERM	0x00000002/* Flag value in in the DT_FLAGS_1 .dynamic entry.  */#define DF_1_NOW	0x00000001#define DF_1_GLOBAL	0x00000002#define DF_1_GROUP	0x00000004#define DF_1_NODELETE	0x00000008#define DF_1_LOADFLTR	0x00000010#define DF_1_INITFIRST	0x00000020#define DF_1_NOOPEN	0x00000040#define DF_1_ORIGIN	0x00000080#define DF_1_DIRECT	0x00000100#define DF_1_TRANS	0x00000200#define DF_1_INTERPOSE	0x00000400#define DF_1_NODEFLIB	0x00000800#define DF_1_NODUMP	0x00001000#define DF_1_CONLFAT	0x00002000/* Flag values for the DT_FLAGS entry.  */#define DF_ORIGIN	(1 << 0)#define DF_SYMBOLIC	(1 << 1)#define DF_TEXTREL	(1 << 2)#define DF_BIND_NOW	(1 << 3)/* These constants are used for the version number of a Elf32_Verdef   structure.  */#define VER_DEF_NONE		0#define VER_DEF_CURRENT		1/* These constants appear in the vd_flags field of a Elf32_Verdef   structure.  */#define VER_FLG_BASE		0x1#define VER_FLG_WEAK		0x2/* These special constants can be found in an Elf32_Versym field.  */#define VER_NDX_LOCAL		0#define VER_NDX_GLOBAL		1/* These constants are used for the version number of a Elf32_Verneed   structure.  */#define VER_NEED_NONE		0#define VER_NEED_CURRENT	1/* This flag appears in a Versym structure.  It means that the symbol   is hidden, and is only visible with an explicit version number.   This is a GNU extension.  */#define VERSYM_HIDDEN		0x8000/* This is the mask for the rest of the Versym information.  */#define VERSYM_VERSION		0x7fff/* This is a special token which appears as part of a symbol name.  It   indictes that the rest of the name is actually the name of a   version node, and is not part of the actual name.  This is a GNU   extension.  For example, the symbol name `stat@ver2' is taken to   mean the symbol `stat' in version `ver2'.  */#define ELF_VER_CHR	'@'/* Possible values for si_boundto.  */#define SYMINFO_BT_SELF		0xffff	/* Symbol bound to self */#define SYMINFO_BT_PARENT	0xfffe	/* Symbol bound to parent */#define SYMINFO_BT_LOWRESERVE	0xff00	/* Beginning of reserved entries *//* Possible bitmasks for si_flags.  */#define SYMINFO_FLG_DIRECT	0x0001	/* Direct bound symbol */#define SYMINFO_FLG_PASSTHRU	0x0002	/* Pass-thru symbol for translator */#define SYMINFO_FLG_COPY	0x0004	/* Symbol is a copy-reloc */#define SYMINFO_FLG_LAZYLOAD	0x0008	/* Symbol bound to object to be lazy loaded *//* Syminfo version values.  */#define SYMINFO_NONE		0#define SYMINFO_CURRENT		1#define SYMINFO_NUM		2/* Section Group Flags.  */#define GRP_COMDAT		0x1	/* A COMDAT group */#endif /* _ELF_COMMON_H */

⌨️ 快捷键说明

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