elf_common.h
来自「M5,一个功能强大的多处理器系统模拟器.很多针对处理器架构,性能的研究都使用它作」· C头文件 代码 · 共 847 行 · 第 1/3 页
H
847 行
#define DT_NULL 0 /* Terminating entry. */#define DT_NEEDED 1 /* String table offset of a needed shared library. */#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */#define DT_PLTGOT 3 /* Processor-dependent address. */#define DT_HASH 4 /* Address of symbol hash table. */#define DT_STRTAB 5 /* Address of string table. */#define DT_SYMTAB 6 /* Address of symbol table. */#define DT_RELA 7 /* Address of ElfNN_Rela relocations. */#define DT_RELASZ 8 /* Total size of ElfNN_Rela relocations. */#define DT_RELAENT 9 /* Size of each ElfNN_Rela relocation entry. */#define DT_STRSZ 10 /* Size of string table. */#define DT_SYMENT 11 /* Size of each symbol table entry. */#define DT_INIT 12 /* Address of initialization function. */#define DT_FINI 13 /* Address of finalization function. */#define DT_SONAME 14 /* String table offset of shared object name. */#define DT_RPATH 15 /* String table offset of library path. [sup] */#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */#define DT_REL 17 /* Address of ElfNN_Rel relocations. */#define DT_RELSZ 18 /* Total size of ElfNN_Rel relocations. */#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */#define DT_PLTREL 20 /* Type of relocation used for PLT. */#define DT_DEBUG 21 /* Reserved (not used). */#define DT_TEXTREL 22 /* Indicates there may be relocations in non-writable segments. [sup] */#define DT_JMPREL 23 /* Address of PLT relocations. */#define DT_BIND_NOW 24 /* [sup] */#define DT_INIT_ARRAY 25 /* Address of the array of pointers to initialization functions */#define DT_FINI_ARRAY 26 /* Address of the array of pointers to termination functions */#define DT_INIT_ARRAYSZ 27 /* Size in bytes of the array of initialization functions. */#define DT_FINI_ARRAYSZ 28 /* Size in bytes of the array of terminationfunctions. */#define DT_RUNPATH 29 /* String table offset of a null-terminated library search path string. */#define DT_FLAGS 30 /* Object specific flag values. */#define DT_ENCODING 32 /* Values greater than or equal to DT_ENCODING and less than DT_LOOS follow the rules for the interpretation of the d_un union as follows: even == 'd_ptr', even == 'd_val' or none */#define DT_PREINIT_ARRAY 32 /* Address of the array of pointers to pre-initialization functions. */#define DT_PREINIT_ARRAYSZ 33 /* Size in bytes of the array of pre-initialization functions. */#define DT_MAXPOSTAGS 34 /* number of positive tags */#define DT_LOOS 0x6000000d /* First OS-specific */#define DT_SUNW_AUXILIARY 0x6000000d /* symbol auxiliary name */#define DT_SUNW_RTLDINF 0x6000000e /* ld.so.1 info (private) */#define DT_SUNW_FILTER 0x6000000f /* symbol filter name */#define DT_SUNW_CAP 0x60000010 /* hardware/software */#define DT_HIOS 0x6ffff000 /* Last OS-specific *//* * DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the * Dyn.d_un.d_val field of the Elf*_Dyn structure. */#define DT_VALRNGLO 0x6ffffd00#define DT_CHECKSUM 0x6ffffdf8 /* elf checksum */#define DT_PLTPADSZ 0x6ffffdf9 /* pltpadding size */#define DT_MOVEENT 0x6ffffdfa /* move table entry size */#define DT_MOVESZ 0x6ffffdfb /* move table size */#define DT_FEATURE_1 0x6ffffdfc /* feature holder */#define DT_POSFLAG_1 0x6ffffdfd /* flags for DT_* entries, effecting */ /* the following DT_* entry. */ /* See DF_P1_* definitions */#define DT_SYMINSZ 0x6ffffdfe /* syminfo table size (in bytes) */#define DT_SYMINENT 0x6ffffdff /* syminfo entry size (in bytes) */#define DT_VALRNGHI 0x6ffffdff/* * DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the * Dyn.d_un.d_ptr field of the Elf*_Dyn structure. * * If any adjustment is made to the ELF object after it has been * built, these entries will need to be adjusted. */#define DT_ADDRRNGLO 0x6ffffe00#define DT_CONFIG 0x6ffffefa /* configuration information */#define DT_DEPAUDIT 0x6ffffefb /* dependency auditing */#define DT_AUDIT 0x6ffffefc /* object auditing */#define DT_PLTPAD 0x6ffffefd /* pltpadding (sparcv9) */#define DT_MOVETAB 0x6ffffefe /* move table */#define DT_SYMINFO 0x6ffffeff /* syminfo table */#define DT_ADDRRNGHI 0x6ffffeff#define DT_VERSYM 0x6ffffff0 /* Address of versym section. */#define DT_RELACOUNT 0x6ffffff9 /* number of RELATIVE relocations */#define DT_RELCOUNT 0x6ffffffa /* number of RELATIVE relocations */#define DT_FLAGS_1 0x6ffffffb /* state flags - see DF_1_* defs */#define DT_VERDEF 0x6ffffffc /* Address of verdef section. */#define DT_VERDEFNUM 0x6ffffffd /* Number of elems in verdef section */#define DT_VERNEED 0x6ffffffe /* Address of verneed section. */#define DT_VERNEEDNUM 0x6fffffff /* Number of elems in verneed section */#define DT_LOPROC 0x70000000 /* First processor-specific type. */#define DT_DEPRECATED_SPARC_REGISTER 0x7000001#define DT_AUXILIARY 0x7ffffffd /* shared library auxiliary name */#define DT_USED 0x7ffffffe /* ignored - same as needed */#define DT_FILTER 0x7fffffff /* shared library filter name */#define DT_HIPROC 0x7fffffff /* Last processor-specific type. *//* Values for DT_FLAGS */#define DF_ORIGIN 0x0001 /* Indicates that the object being loaded may make reference to the $ORIGIN substitution string */#define DF_SYMBOLIC 0x0002 /* Indicates "symbolic" linking. */#define DF_TEXTREL 0x0004 /* Indicates there may be relocations in non-writable segments. */#define DF_BIND_NOW 0x0008 /* Indicates that the dynamic linker should process all relocations for the object containing this entry before transferring control to the program. */#define DF_STATIC_TLS 0x0010 /* Indicates that the shared object or executable contains code using a static thread-local storage scheme. *//* Values for n_type. Used in core files. */#define NT_PRSTATUS 1 /* Process status. */#define NT_FPREGSET 2 /* Floating point registers. */#define NT_PRPSINFO 3 /* Process state info. *//* Symbol Binding - ELFNN_ST_BIND - st_info */#define STB_LOCAL 0 /* Local symbol */#define STB_GLOBAL 1 /* Global symbol */#define STB_WEAK 2 /* like global - lower precedence */#define STB_LOOS 10 /* Reserved range for operating system */#define STB_HIOS 12 /* specific semantics. */#define STB_LOPROC 13 /* reserved range for processor */#define STB_HIPROC 15 /* specific semantics. *//* Symbol type - ELFNN_ST_TYPE - st_info */#define STT_NOTYPE 0 /* Unspecified type. */#define STT_OBJECT 1 /* Data object. */#define STT_FUNC 2 /* Function. */#define STT_SECTION 3 /* Section. */#define STT_FILE 4 /* Source file. */#define STT_COMMON 5 /* Uninitialized common block. */#define STT_TLS 6 /* TLS object. */#define STT_NUM 7#define STT_LOOS 10 /* Reserved range for operating system */#define STT_HIOS 12 /* specific semantics. */#define STT_LOPROC 13 /* reserved range for processor */#define STT_HIPROC 15 /* specific semantics. *//* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */#define STV_DEFAULT 0x0 /* Default visibility (see binding). */#define STV_INTERNAL 0x1 /* Special meaning in relocatable objects. */#define STV_HIDDEN 0x2 /* Not visible. */#define STV_PROTECTED 0x3 /* Visible but not preemptible. *//* Special symbol table indexes. */#define STN_UNDEF 0 /* Undefined symbol index. *//* Symbol versioning flags. */#define VER_DEF_CURRENT 1#define VER_DEF_IDX(x) VER_NDX(x)#define VER_FLG_BASE 0x01#define VER_FLG_WEAK 0x02#define VER_NEED_CURRENT 1#define VER_NEED_WEAK (1u << 15)#define VER_NEED_HIDDEN VER_NDX_HIDDEN#define VER_NEED_IDX(x) VER_NDX(x)#define VER_NDX_LOCAL 0#define VER_NDX_GLOBAL 1#define VER_NDX_GIVEN 2#define VER_NDX_HIDDEN (1u << 15)#define VER_NDX(x) ((x) & ~(1u << 15))#define CA_SUNW_NULL 0#define CA_SUNW_HW_1 1 /* first hardware capabilities entry */#define CA_SUNW_SF_1 2 /* first software capabilities entry *//* * Syminfo flag values */#define SYMINFO_FLG_DIRECT 0x0001 /* symbol ref has direct association */ /* to object containing defn. */#define SYMINFO_FLG_PASSTHRU 0x0002 /* ignored - see SYMINFO_FLG_FILTER */#define SYMINFO_FLG_COPY 0x0004 /* symbol is a copy-reloc */#define SYMINFO_FLG_LAZYLOAD 0x0008 /* object containing defn should be */ /* lazily-loaded */#define SYMINFO_FLG_DIRECTBIND 0x0010 /* ref should be bound directly to */ /* object containing defn. */#define SYMINFO_FLG_NOEXTDIRECT 0x0020 /* don't let an external reference */ /* directly bind to this symbol */#define SYMINFO_FLG_FILTER 0x0002 /* symbol ref is associated to a */#define SYMINFO_FLG_AUXILIARY 0x0040 /* standard or auxiliary filter *//* * Syminfo.si_boundto values. */#define SYMINFO_BT_SELF 0xffff /* symbol bound to self */#define SYMINFO_BT_PARENT 0xfffe /* symbol bound to parent */#define SYMINFO_BT_NONE 0xfffd /* no special symbol binding */#define SYMINFO_BT_EXTERN 0xfffc /* symbol defined as external */#define SYMINFO_BT_LOWRESERVE 0xff00 /* beginning of reserved entries *//* * Syminfo version values. */#define SYMINFO_NONE 0 /* Syminfo version */#define SYMINFO_CURRENT 1#define SYMINFO_NUM 2/* * Relocation types. * * All machine architectures are defined here to allow tools on one to * handle others. */#define R_386_NONE 0 /* No relocation. */#define R_386_32 1 /* Add symbol value. */#define R_386_PC32 2 /* Add PC-relative symbol value. */#define R_386_GOT32 3 /* Add PC-relative GOT offset. */#define R_386_PLT32 4 /* Add PC-relative PLT offset. */#define R_386_COPY 5 /* Copy data from shared object. */#define R_386_GLOB_DAT 6 /* Set GOT entry to data address. */#define R_386_JMP_SLOT 7 /* Set GOT entry to code address. */#define R_386_RELATIVE 8 /* Add load address of shared object. */#define R_386_GOTOFF 9 /* Add GOT-relative symbol address. */#define R_386_GOTPC 10 /* Add PC-relative GOT table address. */#define R_386_TLS_TPOFF 14 /* Negative offset in static TLS block */#define R_386_TLS_IE 15 /* Absolute address of GOT for -ve static TLS */#define R_386_TLS_GOTIE 16 /* GOT entry for negative static TLS block */#define R_386_TLS_LE 17 /* Negative offset relative to static TLS */#define R_386_TLS_GD 18 /* 32 bit offset to GOT (index,off) pair */#define R_386_TLS_LDM 19 /* 32 bit offset to GOT (index,zero) pair */#define R_386_TLS_GD_32 24 /* 32 bit offset to GOT (index,off) pair */#define R_386_TLS_GD_PUSH 25 /* pushl instruction for Sun ABI GD sequence */#define R_386_TLS_GD_CALL 26 /* call instruction for Sun ABI GD sequence */#define R_386_TLS_GD_POP 27 /* popl instruction for Sun ABI GD sequence */#define R_386_TLS_LDM_32 28 /* 32 bit offset to GOT (index,zero) pair */#define R_386_TLS_LDM_PUSH 29 /* pushl instruction for Sun ABI LD sequence */#define R_386_TLS_LDM_CALL 30 /* call instruction for Sun ABI LD sequence */#define R_386_TLS_LDM_POP 31 /* popl instruction for Sun ABI LD sequence */#define R_386_TLS_LDO_32 32 /* 32 bit offset from start of TLS block */#define R_386_TLS_IE_32 33 /* 32 bit offset to GOT static TLS offset entry */#define R_386_TLS_LE_32 34 /* 32 bit offset within static TLS block */#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */#define R_ARM_NONE 0 /* No relocation. */#define R_ARM_PC24 1#define R_ARM_ABS32 2#define R_ARM_REL32 3#define R_ARM_PC13 4#define R_ARM_ABS16 5#define R_ARM_ABS12 6#define R_ARM_THM_ABS5 7#define R_ARM_ABS8 8#define R_ARM_SBREL32 9#define R_ARM_THM_PC22 10#define R_ARM_THM_PC8 11#define R_ARM_AMP_VCALL9 12#define R_ARM_SWI24 13#define R_ARM_THM_SWI8 14#define R_ARM_XPC25 15#define R_ARM_THM_XPC22 16#define R_ARM_COPY 20 /* Copy data from shared object. */#define R_ARM_GLOB_DAT 21 /* Set GOT entry to data address. */#define R_ARM_JUMP_SLOT 22 /* Set GOT entry to code address. */#define R_ARM_RELATIVE 23 /* Add load address of shared object. */#define R_ARM_GOTOFF 24 /* Add GOT-relative symbol address. */#define R_ARM_GOTPC 25 /* Add PC-relative GOT table address. */#define R_ARM_GOT32 26 /* Add PC-relative GOT offset. */#define R_ARM_PLT32 27 /* Add PC-relative PLT offset. */#define R_ARM_GNU_VTENTRY 100#define R_ARM_GNU_VTINHERIT 101#define R_ARM_RSBREL32 250#define R_ARM_THM_RPC22 251#define R_ARM_RREL32 252#define R_ARM_RABS32 253#define R_ARM_RPC24 254
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?