📄 elf.h
字号:
#define EM_PPC 20 /* PowerPC */#define EM_PPC64 21 /* PowerPC 64-bit */#define EM_V800 36 /* NEC V800 series */#define EM_FR20 37 /* Fujitsu FR20 */#define EM_RH32 38 /* TRW RH32 */#define EM_MMA 39 /* Fujitsu MMA */#define EM_ARM 40 /* ARM */#define EM_FAKE_ALPHA 41 /* Digital Alpha */#define EM_SH 42 /* Hitachi SH */#define EM_SPARCV9 43 /* SPARC v9 64-bit */#define EM_TRICORE 44 /* Siemens Tricore */#define EM_ARC 45 /* Argonaut RISC Core */#define EM_H8_300 46 /* Hitachi H8/300 */#define EM_H8_300H 47 /* Hitachi H8/300H */#define EM_H8S 48 /* Hitachi H8S */#define EM_H8_500 49 /* Hitachi H8/500 */#define EM_IA_64 50 /* Intel Merced */#define EM_MIPS_X 51 /* Stanford MIPS-X */#define EM_COLDFIRE 52 /* Motorola Coldfire */#define EM_68HC12 53 /* Motorola M68HC12 *//* #define EM_MMA 54 Fujitsu MMA Multimedia Accelerator*/#define EM_PCP 55 /* Siemens PCP */#define EM_NCPU 56 /* Sony nCPU embeeded RISC */#define EM_NDR1 57 /* Denso NDR1 microprocessor */#define EM_STARCORE 58 /* Motorola Start*Core processor */#define EM_ME16 59 /* Toyota ME16 processor */#define EM_ST100 60 /* STMicroelectronic ST100 processor */#define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/#define EM_X8664 62 /* AMD x86-64 */#define EM_FX66 66 /* Siemens FX66 microcontroller */#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */#define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller */#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller */#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller */#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller */#define EM_SVX 73 /* Silicon Graphics SVx */#define EM_AT19 74 /* STMicroelectronics ST19 8 bit mc */#define EM_VAX 75 /* Digital VAX *//* This is an interim value that we will use until the committee comes * up with a final number. */#define EM_ALPHA 0x9026#define EM_S390 0xA390 /* IBM S390 */#define SHT_LOOS 0x60000000 /* Start OS-specific */#define SHT_LOSUNW 0x6ffffffa /* Sun-specific low bound. */#define SHT_SUNW_move 0x6ffffffa#define SHT_SUNW_COMDAT 0x6ffffffb#define SHT_SUNW_syminfo 0x6ffffffc#define SHT_GNU_verdef 0x6ffffffd /* Version definition section. */#define SHT_GNU_verneed 0x6ffffffe /* Version needs section. */#define SHT_GNU_versym 0x6fffffff /* Version symbol table. */#define SHT_HISUNW 0x6fffffff /* Sun-specific high bound. */#define SHT_HIOS 0x6fffffff /* End OS-specific type */#define SHF_MERGE 0x00000010 /* Might be merged */#define SHF_STRINGS 0x00000020 /* Contains nul-terminated strings */#define SHF_INFO_LINK 0x00000040 /* `sh_info' contains SHT index */#define SHF_LINK_ORDER 0x00000080 /* Preserve order after combining */#define SHF_OS_NONCONFORMING 0x00000100 /* Non-standard OS specific handling required */#define SHF_MASKOS 0x0ff00000 /* OS-specific. */#define STB_LOOS 10 /* Start of OS-specific */#define STB_HIOS 12 /* End of OS-specific */#define STT_LOOS 10 /* Start of OS-specific */#define STT_HIOS 12 /* End of OS-specific */#define PT_LOOS 0x60000000 /* Start of OS-specific */#define PT_HIOS 0x6fffffff /* End of OS-specific */#define PF_X (1 << 0) /* Segment is executable */#define PF_W (1 << 1) /* Segment is writable */#define PF_R (1 << 2) /* Segment is readable */#define PF_MASKOS 0x0ff00000 /* OS-specific */#define PF_MASKPROC 0xf0000000 /* Processor-specific */#define DT_BIND_NOW 24 /* Process relocations of object */#define DT_INIT_ARRAY 25 /* Array with addresses of init fct */#define DT_FINI_ARRAY 26 /* Array with addresses of fini fct */#define DT_INIT_ARRAYSZ 27 /* Size in bytes of DT_INIT_ARRAY */#define DT_FINI_ARRAYSZ 28 /* Size in bytes of DT_FINI_ARRAY */#define DT_RUNPATH 29 /* Library search path */#define DT_FLAGS 30 /* Flags for the object being loaded */#define DT_ENCODING 32 /* Start of encoded range */#define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/#define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */#define DT_LOOS 0x60000000 /* Start of OS-specific */#define DT_HIOS 0x6fffffff /* End of OS-specific *//* * All-new categories of definitions from <elf.h> and <linux/elf.h>. *//* How to extract and insert information held in the st_other field. */#define ELF32_ST_VISIBILITY(o) ((o) & 0x03)/* Symbol visibility specification encoded in the st_other field. */#define STV_DEFAULT 0 /* Default symbol visibility rules */#define STV_INTERNAL 1 /* Processor specific hidden class */#define STV_HIDDEN 2 /* Sym unavailable in other modules */#define STV_PROTECTED 3 /* Not preemptible, not exported *//* The syminfo section if available contains additional information about every dynamic symbol. */typedef struct{ Elf32_Half si_boundto; /* Direct bindings, symbol bound to */ Elf32_Half si_flags; /* Per symbol flags */} Elf32_Syminfo;/* 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/* Legal values for the note segment descriptor types for object files. */#define NT_VERSION 1 /* Contains a version string. *//* DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the Dyn.d_un.d_val field of the Elf*_Dyn structure. This follows Sun's approach. */#define DT_VALRNGLO 0x6ffffd00#define DT_PLTPADSZ 0x6ffffdf9#define DT_MOVEENT 0x6ffffdfa#define DT_MOVESZ 0x6ffffdfb#define DT_FEATURE_1 0x6ffffdfc /* Feature selection (DTF_*). */#define DT_POSFLAG_1 0x6ffffdfd /* Flags for DT_* entries, effecting the following DT_* entry. */#define DT_SYMINSZ 0x6ffffdfe /* Size of syminfo table (in bytes) */#define DT_SYMINENT 0x6ffffdff /* Entry size of syminfo */#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_SYMINFO 0x6ffffeff /* syminfo table */#define DT_ADDRRNGHI 0x6ffffeff/* The versioning entry types. The next are defined as part of the GNU extension. */#define DT_VERSYM 0x6ffffff0#define DT_RELACOUNT 0x6ffffff9#define DT_RELCOUNT 0x6ffffffa/* These were chosen by Sun. */#define DT_FLAGS_1 0x6ffffffb /* State flags, see DF_1_* below. */#define DT_VERDEF 0x6ffffffc /* Address of version definition table */#define DT_VERDEFNUM 0x6ffffffd /* Number of version definitions */#define DT_VERNEED 0x6ffffffe /* Address of table with needed versions */#define DT_VERNEEDNUM 0x6fffffff /* Number of needed versions */#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */#define DT_VERSIONTAGNUM 16/* Sun added these machine-independent extensions in the "processor-specific" range. Be compatible. */#define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */#define DT_FILTER 0x7fffffff /* Shared object to get values from */#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)#define DT_EXTRANUM 3/* Values of `d_un.d_val' in the DT_FLAGS entry. */#define DF_ORIGIN 0x00000001 /* Object may use DF_ORIGIN */#define DF_SYMBOLIC 0x00000002 /* Symbol resolutions starts here */#define DF_TEXTREL 0x00000004 /* Object contains text relocations */#define DF_BIND_NOW 0x00000008 /* No lazy binding for this object *//* State flags selectable in the `d_un.d_val' element of the DT_FLAGS_1 entry in the dynamic section. */#define DF_1_NOW 0x00000001 /* Set RTLD_NOW for this object. */#define DF_1_GLOBAL 0x00000002 /* Set RTLD_GLOBAL for this object. */#define DF_1_GROUP 0x00000004 /* Set RTLD_GROUP for this object. */#define DF_1_NODELETE 0x00000008 /* Set RTLD_NODELETE for this object.*/#define DF_1_LOADFLTR 0x00000010 /* Trigger filtee loading at runtime.*/#define DF_1_INITFIRST 0x00000020 /* Set RTLD_INITFIRST for this object*/#define DF_1_NOOPEN 0x00000040 /* Set RTLD_NOOPEN for this object. */#define DF_1_ORIGIN 0x00000080 /* $ORIGIN must be handled. */#define DF_1_DIRECT 0x00000100 /* Direct binding enabled. */#define DF_1_TRANS 0x00000200#define DF_1_INTERPOSE 0x00000400 /* Object is used to interpose. */#define DF_1_NODEFLIB 0x00000800 /* Ignore default lib search path. */#define DF_1_NODUMP 0x00001000#define DF_1_CONFALT 0x00002000#define DF_1_ENDFILTEE 0x00004000/* Flags for the feature selection in DT_FEATURE_1. */#define DTF_1_PARINIT 0x00000001#define DTF_1_CONFEXP 0x00000002/* Flags in the DT_POSFLAG_1 entry effecting only the next DT_* entry. */#define DF_P1_LAZYLOAD 0x00000001 /* Lazyload following object. */#define DF_P1_GROUPPERM 0x00000002 /* Symbols from next object are not generally available. *//* Version definition sections. */typedef struct{ Elf32_Half vd_version; /* Version revision */ Elf32_Half vd_flags; /* Version information */ Elf32_Half vd_ndx; /* Version Index */ Elf32_Half vd_cnt; /* Number of associated aux entries */ Elf32_Word vd_hash; /* Version name hash value */ Elf32_Word vd_aux; /* Offset in bytes to verdaux array */ Elf32_Word vd_next; /* Offset in bytes to next verdef entry */} Elf32_Verdef;/* Legal values for vd_version (version revision). */#define VER_DEF_NONE 0 /* No version */#define VER_DEF_CURRENT 1 /* Current version *//* Legal values for vd_flags (version information flags). */#define VER_FLG_BASE 0x1 /* Version definition of file itself */#define VER_FLG_WEAK 0x2 /* Weak version identifier *//* Auxialiary version information. */typedef struct{ Elf32_Word vda_name; /* Version or dependency names */ Elf32_Word vda_next; /* Offset in bytes to next verdaux entry */} Elf32_Verdaux;/* Version dependency section. */typedef struct{ Elf32_Half vn_version; /* Version of structure */ Elf32_Half vn_cnt; /* Number of associated aux entries */ Elf32_Word vn_file; /* Offset of filename for this dependency */ Elf32_Word vn_aux; /* Offset in bytes to vernaux array */ Elf32_Word vn_next; /* Offset in bytes to next verneed entry */} Elf32_Verneed;/* Legal values for vn_version (version revision). */#define VER_NEED_NONE 0 /* No version */#define VER_NEED_CURRENT 1 /* Current version *//* Auxiliary needed version information. */typedef struct{ Elf32_Word vna_hash; /* Hash value of dependency name */ Elf32_Half vna_flags; /* Dependency specific information */ Elf32_Half vna_other; /* Unused */ Elf32_Word vna_name; /* Dependency name string offset */ Elf32_Word vna_next; /* Offset in bytes to next vernaux entry */} Elf32_Vernaux;/* Legal values for vna_flags. */#define VER_FLG_WEAK 0x2 /* Weak version identifier *//* Defined types of notes for Solaris. *//* Value of descriptor (one word) is desired pagesize for the binary. */#define ELF_NOTE_PAGESIZE_HINT 1/* Defined note types for GNU systems. *//* ABI information. The descriptor consists of words: word 0: OS descriptor word 1: major version of the ABI word 2: minor version of the ABI word 3: subminor version of the ABI*/#define ELF_NOTE_ABI 1/* Known OSes. These value can appear in word 0 of an ELF_NOTE_ABI note section entry. */#define ELF_NOTE_OS_LINUX 0#define ELF_NOTE_OS_GNU 1#define ELF_NOTE_OS_SOLARIS2 2#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -