add version, machine, and other descriptions
This commit is contained in:
parent
8c9f75d521
commit
a16720e92f
1 changed files with 39 additions and 7 deletions
|
|
@ -45,17 +45,18 @@ typedef struct {
|
||||||
Elf64_Half e_shstrndx;
|
Elf64_Half e_shstrndx;
|
||||||
} Elf64_Ehdr;
|
} Elf64_Ehdr;
|
||||||
|
|
||||||
/* == ElfXX_Ehdr.e_ident[] ==
|
/* == ElfN_Ehdr.e_ident[] ==
|
||||||
* EI_* macros define indexes into this this, and are followed
|
* EI_* macros define indexes into this this, and are followed
|
||||||
* by a series a macros defining legal values for that index.
|
* by a series a macros defining legal values for that index.
|
||||||
*/
|
*/
|
||||||
# define E_IDENT_DESC ( \
|
/* XXX: WARNING: TODO :WARNING :XXX */
|
||||||
"The initial bytes of an ELF file. Marking it as an object file " \
|
# define E_IDENT_DESC ( \
|
||||||
"and providing machine-independent data with which to decode " \
|
"The initial bytes of an ELF file.\n\n" \
|
||||||
"and interpret the file’s contents."
|
"Marks the file as an object file and provides machine-independent " \
|
||||||
|
"data with which to parse and interpret the file’s contents." )
|
||||||
|
|
||||||
/* == ElfXX_Ehdr.e_type == */
|
/* == ElfN_Ehdr.e_type == */
|
||||||
enum e_type_t : Elf64_Addr {
|
enum e_type_t {
|
||||||
ET_NONE = 0, /* No file type */
|
ET_NONE = 0, /* No file type */
|
||||||
ET_REL = 1, /* Relocatable file */
|
ET_REL = 1, /* Relocatable file */
|
||||||
ET_EXEC = 2, /* Executable file */
|
ET_EXEC = 2, /* Executable file */
|
||||||
|
|
@ -66,6 +67,37 @@ enum e_type_t : Elf64_Addr {
|
||||||
ET_LOPROC = 0xff00, /* Processor-specific range start */
|
ET_LOPROC = 0xff00, /* Processor-specific range start */
|
||||||
ET_HIPROC = 0xffff, /* Processor-specific range end */
|
ET_HIPROC = 0xffff, /* Processor-specific range end */
|
||||||
};
|
};
|
||||||
|
# define E_TYPE_DESC ( \
|
||||||
|
"Identifies the object file type.\n\n" \
|
||||||
|
"ET_CORE is reserved and largely used by core files. " \
|
||||||
|
"However the actual file contents are left unspecified. " \
|
||||||
|
"Allowing projects to define their own extensions.\n\n" \
|
||||||
|
"Values ET_LOOS through ET_HIOS (inclusive) are reserved " \
|
||||||
|
"for OS-specific object file types.\n\n" \
|
||||||
|
"Values ET_LOPROC through ET_HIPROC (inclusive) are reserved " \
|
||||||
|
"for processor-specific object file types." )
|
||||||
|
|
||||||
|
/* == ElfN_Ehdr.e_machine == */
|
||||||
|
enum e_machine_t {
|
||||||
|
/* XXX: WARNING: TODO :WARNING :XXX */
|
||||||
|
};
|
||||||
|
#define E_MACHINE_DESC ()
|
||||||
|
|
||||||
|
/* == ElfN_Ehdr.e_version == */
|
||||||
|
enum e_version_t {
|
||||||
|
EV_NONE = 0, /* Invalid version */
|
||||||
|
EV_CURRENT = 1, /* Current Version */
|
||||||
|
};
|
||||||
|
#define E_VERSION_DESC ( \
|
||||||
|
"Version of ELF used.\n\n" \
|
||||||
|
"EV_CURRENT signifies the original file format. " \
|
||||||
|
"Extensions will use higher e_machine numbers" )
|
||||||
|
|
||||||
|
/* == ElfN_Ehdr.e_entry == */
|
||||||
|
#define E_ENTRY_DESC ( \
|
||||||
|
"Virtual address of the entry point.\n\n" \
|
||||||
|
"The system first transfers control to this virtual address, " \
|
||||||
|
"thus starting the process. If the file has no associated entry point, " \
|
||||||
|
"this member holds zero." )
|
||||||
|
|
||||||
#endif /* BFPG_ELF_HEADER_H */
|
#endif /* BFPG_ELF_HEADER_H */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue