📄 mips.h
字号:
/* Section contais text/data which may be replicated in other sections. Linker should retain only one copy. */#define SHF_MIPS_NODUPES 0x01000000/* Processor specific program header types. *//* Register usage information. Identifies one .reginfo section. */#define PT_MIPS_REGINFO 0x70000000/* Runtime procedure table. */#define PT_MIPS_RTPROC 0x70000001/* .MIPS.options section. */#define PT_MIPS_OPTIONS 0x70000002/* Processor specific dynamic array tags. *//* 32 bit version number for runtime linker interface. */#define DT_MIPS_RLD_VERSION 0x70000001/* Time stamp. */#define DT_MIPS_TIME_STAMP 0x70000002/* Checksum of external strings and common sizes. */#define DT_MIPS_ICHECKSUM 0x70000003/* Index of version string in string table. */#define DT_MIPS_IVERSION 0x70000004/* 32 bits of flags. */#define DT_MIPS_FLAGS 0x70000005/* Base address of the segment. */#define DT_MIPS_BASE_ADDRESS 0x70000006/* ??? */#define DT_MIPS_MSYM 0x70000007/* Address of .conflict section. */#define DT_MIPS_CONFLICT 0x70000008/* Address of .liblist section. */#define DT_MIPS_LIBLIST 0x70000009/* Number of local global offset table entries. */#define DT_MIPS_LOCAL_GOTNO 0x7000000a/* Number of entries in the .conflict section. */#define DT_MIPS_CONFLICTNO 0x7000000b/* Number of entries in the .liblist section. */#define DT_MIPS_LIBLISTNO 0x70000010/* Number of entries in the .dynsym section. */#define DT_MIPS_SYMTABNO 0x70000011/* Index of first external dynamic symbol not referenced locally. */#define DT_MIPS_UNREFEXTNO 0x70000012/* Index of first dynamic symbol in global offset table. */#define DT_MIPS_GOTSYM 0x70000013/* Number of page table entries in global offset table. */#define DT_MIPS_HIPAGENO 0x70000014/* Address of run time loader map, used for debugging. */#define DT_MIPS_RLD_MAP 0x70000016/* Delta C++ class definition. */#define DT_MIPS_DELTA_CLASS 0x70000017/* Number of entries in DT_MIPS_DELTA_CLASS. */#define DT_MIPS_DELTA_CLASS_NO 0x70000018/* Delta C++ class instances. */#define DT_MIPS_DELTA_INSTANCE 0x70000019/* Number of entries in DT_MIPS_DELTA_INSTANCE. */#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a/* Delta relocations. */#define DT_MIPS_DELTA_RELOC 0x7000001b/* Number of entries in DT_MIPS_DELTA_RELOC. */#define DT_MIPS_DELTA_RELOC_NO 0x7000001c/* Delta symbols that Delta relocations refer to. */#define DT_MIPS_DELTA_SYM 0x7000001d/* Number of entries in DT_MIPS_DELTA_SYM. */#define DT_MIPS_DELTA_SYM_NO 0x7000001e/* Delta symbols that hold class declarations. */#define DT_MIPS_DELTA_CLASSSYM 0x70000020/* Number of entries in DT_MIPS_DELTA_CLASSSYM. */#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021/* Flags indicating information about C++ flavor. */#define DT_MIPS_CXX_FLAGS 0x70000022/* Pixie information (???). */#define DT_MIPS_PIXIE_INIT 0x70000023/* Address of .MIPS.symlib */#define DT_MIPS_SYMBOL_LIB 0x70000024/* The GOT index of the first PTE for a segment */#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025/* The GOT index of the first PTE for a local symbol */#define DT_MIPS_LOCAL_GOTIDX 0x70000026/* The GOT index of the first PTE for a hidden symbol */#define DT_MIPS_HIDDEN_GOTIDX 0x70000027/* The GOT index of the first PTE for a protected symbol */#define DT_MIPS_PROTECTED_GOTIDX 0x70000028/* Address of `.MIPS.options'. */#define DT_MIPS_OPTIONS 0x70000029/* Address of `.interface'. */#define DT_MIPS_INTERFACE 0x7000002a/* ??? */#define DT_MIPS_DYNSTR_ALIGN 0x7000002b/* Size of the .interface section. */#define DT_MIPS_INTERFACE_SIZE 0x7000002c/* Size of rld_text_resolve function stored in the GOT. */#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d/* Default suffix of DSO to be added by rld on dlopen() calls. */#define DT_MIPS_PERF_SUFFIX 0x7000002e/* Size of compact relocation section (O32). */#define DT_MIPS_COMPACT_SIZE 0x7000002f/* GP value for auxiliary GOTs. */#define DT_MIPS_GP_VALUE 0x70000030/* Address of auxiliary .dynamic. */#define DT_MIPS_AUX_DYNAMIC 0x70000031/* Flags which may appear in a DT_MIPS_FLAGS entry. *//* No flags. */#define RHF_NONE 0x00000000/* Uses shortcut pointers. */#define RHF_QUICKSTART 0x00000001/* Hash size is not a power of two. */#define RHF_NOTPOT 0x00000002/* Ignore LD_LIBRARY_PATH. */#define RHS_NO_LIBRARY_REPLACEMENT 0x00000004/* DSO address may not be relocated. */#define RHF_NO_MOVE 0x00000008/* SGI specific features. */#define RHF_SGI_ONLY 0x00000010/* Guarantee that .init will finish executing before any non-init code in DSO is called. */#define RHF_GUARANTEE_INIT 0x00000020/* Contains Delta C++ code. */#define RHF_DELTA_C_PLUS_PLUS 0x00000040/* Guarantee that .init will start executing before any non-init code in DSO is called. */#define RHF_GUARANTEE_START_INIT 0x00000080/* Generated by pixie. */#define RHF_PIXIE 0x00000100/* Delay-load DSO by default. */#define RHF_DEFAULT_DELAY_LOAD 0x00000200/* Object may be requickstarted */#define RHF_REQUICKSTART 0x00000400/* Object has been requickstarted */#define RHF_REQUICKSTARTED 0x00000800/* Generated by cord. */#define RHF_CORD 0x00001000/* Object contains no unresolved undef symbols. */#define RHF_NO_UNRES_UNDEF 0x00002000/* Symbol table is in a safe order. */#define RHF_RLD_ORDER_SAFE 0x00004000/* Special values for the st_other field in the symbol table. These are used in an Irix 5 dynamic symbol table. */#define STO_DEFAULT STV_DEFAULT#define STO_INTERNAL STV_INTERNAL#define STO_HIDDEN STV_HIDDEN#define STO_PROTECTED STV_PROTECTED/* This value is used for a mips16 .text symbol. */#define STO_MIPS16 0xf0/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each relocation entry specifies up to three actual relocations, all at the same address. The first relocation which required a symbol uses the symbol in the r_sym field. The second relocation which requires a symbol uses the symbol in the r_ssym field. If all three relocations require a symbol, the third one uses a zero value. *//* An entry in a 64 bit SHT_REL section. */typedef struct{ /* Address of relocation. */ unsigned char r_offset[8]; /* Symbol index. */ unsigned char r_sym[4]; /* Special symbol. */ unsigned char r_ssym[1]; /* Third relocation. */ unsigned char r_type3[1]; /* Second relocation. */ unsigned char r_type2[1]; /* First relocation. */ unsigned char r_type[1];} Elf64_Mips_External_Rel;typedef struct{ /* Address of relocation. */ bfd_vma r_offset; /* Symbol index. */ unsigned long r_sym; /* Special symbol. */ unsigned char r_ssym; /* Third relocation. */ unsigned char r_type3; /* Second relocation. */ unsigned char r_type2; /* First relocation. */ unsigned char r_type;} Elf64_Mips_Internal_Rel;/* An entry in a 64 bit SHT_RELA section. */typedef struct{ /* Address of relocation. */ unsigned char r_offset[8]; /* Symbol index. */ unsigned char r_sym[4]; /* Special symbol. */ unsigned char r_ssym[1]; /* Third relocation. */ unsigned char r_type3[1]; /* Second relocation. */ unsigned char r_type2[1]; /* First relocation. */ unsigned char r_type[1]; /* Addend. */ unsigned char r_addend[8];} Elf64_Mips_External_Rela;typedef struct{ /* Address of relocation. */ bfd_vma r_offset; /* Symbol index. */ unsigned long r_sym; /* Special symbol. */ unsigned char r_ssym; /* Third relocation. */ unsigned char r_type3; /* Second relocation. */ unsigned char r_type2; /* First relocation. */ unsigned char r_type; /* Addend. */ bfd_signed_vma r_addend;} Elf64_Mips_Internal_Rela;/* MIPS ELF 64 relocation info access macros. */#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff)#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff)#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff)#define ELF64_MIPS_R_TYPE(i) ((i) & 0xff)/* Values found in the r_ssym field of a relocation entry. *//* No relocation. */#define RSS_UNDEF 0/* Value of GP. */#define RSS_GP 1/* Value of GP in object being relocated. */#define RSS_GP0 2/* Address of location being relocated. */#define RSS_LOC 3/* A SHT_MIPS_OPTIONS section contains a series of options, each of which starts with this header. */typedef struct{ /* Type of option. */ unsigned char kind[1]; /* Size of option descriptor, including header. */ unsigned char size[1]; /* Section index of affected section, or 0 for global option. */ unsigned char section[2]; /* Information specific to this kind of option. */ unsigned char info[4];} Elf_External_Options;typedef struct{ /* Type of option. */ unsigned char kind; /* Size of option descriptor, including header. */ unsigned char size; /* Section index of affected section, or 0 for global option. */ unsigned short section; /* Information specific to this kind of option. */ unsigned long info;} Elf_Internal_Options;/* MIPS ELF option header swapping routines. */extern void bfd_mips_elf_swap_options_in (bfd *, const Elf_External_Options *, Elf_Internal_Options *);extern void bfd_mips_elf_swap_options_out (bfd *, const Elf_Internal_Options *, Elf_External_Options *);/* Values which may appear in the kind field of an Elf_Options structure. *//* Undefined. */#define ODK_NULL 0/* Register usage and GP value. */#define ODK_REGINFO 1/* Exception processing information. */#define ODK_EXCEPTIONS 2/* Section padding information. */#define ODK_PAD 3/* Hardware workarounds performed. */#define ODK_HWPATCH 4/* Fill value used by the linker. */#define ODK_FILL 5/* Reserved space for desktop tools. */#define ODK_TAGS 6/* Hardware workarounds, AND bits when merging. */#define ODK_HWAND 7/* Hardware workarounds, OR bits when merging. */#define ODK_HWOR 8/* GP group to use for text/data sections. */#define ODK_GP_GROUP 9/* ID information. */#define ODK_IDENT 10/* In the 32 bit ABI, an ODK_REGINFO option is just a Elf32_RegInfo structure. In the 64 bit ABI, it is the following structure. The info field of the options header is not used. */typedef struct{ /* Mask of general purpose registers used. */ unsigned char ri_gprmask[4]; /* Padding. */ unsigned char ri_pad[4]; /* Mask of co-processor registers used. */ unsigned char ri_cprmask[4][4]; /* GP register value for this object file. */ unsigned char ri_gp_value[8];} Elf64_External_RegInfo;typedef struct{ /* Mask of general purpose registers used. */ unsigned long ri_gprmask; /* Padding. */ unsigned long ri_pad; /* Mask of co-processor registers used. */ unsigned long ri_cprmask[4]; /* GP register value for this object file. */ bfd_vma ri_gp_value;} Elf64_Internal_RegInfo;typedef struct{ /* The hash value computed from the name of the corresponding dynamic symbol. */ unsigned char ms_hash_value[4]; /* Contains both the dynamic relocation index and the symbol flags field. The macros ELF32_MS_REL_INDEX and ELF32_MS_FLAGS are used to access the individual values. The dynamic relocation index identifies the first entry in the .rel.dyn section that references the dynamic symbol corresponding to this msym entry. If the index is 0, no dynamic relocations are associated with the symbol. The symbol flags field is reserved for future use. */ unsigned char ms_info[4];} Elf32_External_Msym;typedef struct{ /* The hash value computed from the name of the corresponding dynamic symbol. */ unsigned long ms_hash_value; /* Contains both the dynamic relocation index and the symbol flags field. The macros ELF32_MS_REL_INDEX and ELF32_MS_FLAGS are used to access the individual values. The dynamic relocation index identifies the first entry in the .rel.dyn section that references the dynamic symbol corresponding to this msym entry. If the index is 0, no dynamic relocations are associated with the symbol. The symbol flags field is reserved for future use. */ unsigned long ms_info;} Elf32_Internal_Msym;#define ELF32_MS_REL_INDEX(i) ((i) >> 8)#define ELF32_MS_FLAGS(i) (i) & 0xff)#define ELF32_MS_INFO(r, f) (((r) << 8) + ((f) & 0xff))/* MIPS ELF reginfo swapping routines. */extern void bfd_mips_elf64_swap_reginfo_in (bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *);extern void bfd_mips_elf64_swap_reginfo_out (bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *);/* Masks for the info work of an ODK_EXCEPTIONS descriptor. */#define OEX_FPU_MIN 0x1f /* FPEs which must be enabled. */#define OEX_FPU_MAX 0x1f00 /* FPEs which may be enabled. */#define OEX_PAGE0 0x10000 /* Page zero must be mapped. */#define OEX_SMM 0x20000 /* Force sequential memory mode. */#define OEX_FPDBUG 0x40000 /* Force precise floating-point exceptions (debug mode). */#define OEX_DISMISS 0x80000 /* Dismiss invalid address faults. *//* Masks of the FP exceptions for OEX_FPU_MIN and OEX_FPU_MAX. */#define OEX_FPU_INVAL 0x10 /* Invalid operation exception. */#define OEX_FPU_DIV0 0x08 /* Division by zero exception. */#define OEX_FPU_OFLO 0x04 /* Overflow exception. */#define OEX_FPU_UFLO 0x02 /* Underflow exception. */#define OEX_FPU_INEX 0x01 /* Inexact exception. *//* Masks for the info word of an ODK_PAD descriptor. */#define OPAD_PREFIX 0x01#define OPAD_POSTFIX 0x02#define OPAD_SYMBOL 0x04/* Masks for the info word of an ODK_HWPATCH descriptor. */#define OHW_R4KEOP 0x00000001 /* R4000 end-of-page patch. */#define OHW_R8KPFETCH 0x00000002 /* May need R8000 prefetch patch. */#define OHW_R5KEOP 0x00000004 /* R5000 end-of-page patch. */#define OHW_R5KCVTL 0x00000008 /* R5000 cvt.[ds].l bug (clean == 1). */#define OHW_R10KLDL 0x00000010 /* Needs R10K misaligned load patch. *//* Masks for the info word of an ODK_IDENT/ODK_GP_GROUP descriptor. */#define OGP_GROUP 0x0000ffff /* GP group number. */#define OGP_SELF 0xffff0000 /* Self-contained GP groups. *//* Masks for the info word of an ODK_HWAND/ODK_HWOR descriptor. */#define OHWA0_R4KEOP_CHECKED 0x00000001#define OHWA0_R4KEOP_CLEAN 0x00000002#endif /* _ELF_MIPS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -