documentation/kernel/drivers/elf/header.h.md

2.7 KiB

header.h

Definitions needed to parse the ELF Header.

elf_target_architecture_E - enum

Field in elf_header_T: identity[4]

elf_endianness_E - enum

Field in elf_header_T: identity[5]

elf_sysabi_E - enum

Field in elf_header_T: identity[7]

elf_object_type_E - enum

Field in elf_header_T: type

elf_instruction_set_E - enum

Field in elf_header_T: isa

elf_header_T - struct

Name Type Description
identity uint8_t[16] Information like the used endian and the SysABI is stored in here
type uint16_t The type of the elf file -> elf_object_type_E
isa uint16_t The used instruction set -> elf_instruction_set_E
version uint32_t ELF version
address_entry_point uint64_t The start point for program execution
offset_program_header uint64_t The position of the program header array in the file
offset_section_header uint64_t The position of the section header array in the file
flags uint32_t Architecture dependent, can be ignored
len_header uint16_t The size of this header
len_program_header_entry uint16_t The size of one program header
num_program_header_entries uint16_t The amount of program headers
len_section_header_entry uint16_t The size of one section header
num_section_header_entries uint16_t The amount of section headers
string_section_index uint16_t The section header index of the .shstrtab section

g_elf_target_architecture_strings - global variable

An array of strings matching elf_target_architecture_E.

g_elf_endianness_strings - global variable

An array of strings matching elf_endianess_E.

g_elf_sysabi_strings - global variable

An array of strings matching elf_sysabi_E.

g_elf_object_type_strings - global variable

An array of strings matching elf_object_type_E.

g_elf_instruction_set_strings - global variable

An array of strings matching elf_instruction_set_E.