15typedef uint16_t elf32_half;
16typedef uint32_t elf32_word;
17typedef int32_t elf32_sword;
18typedef uint32_t elf32_off;
19typedef uint32_t elf32_addr;
113 elf32_word sh_entsize;
135 SHF_MASKPROC = 0xf0000000,
151#define ELF32_ST_BIND(info) ((info) >> 4)
152#define ELF32_ST_TYPE(info) ((info)&0xf)
153#define ELF32_ST_INFO(bind, type) (((bind) << 4) | ((type)&0xf))
ELF file header.
Definition: elf32.h:22
elf32_off e_shoff
Offset to the section header table.
Definition: elf32.h:29
elf32_half e_machine
Machine type.
Definition: elf32.h:25
elf32_half e_phentsize
Size of a entry inside the program header table.
Definition: elf32.h:32
elf32_word e_flags
Processor specific flags.
Definition: elf32.h:30
elf32_half e_phnum
Number of entries inside the program header table.
Definition: elf32.h:33
elf32_half e_shentsize
Size of a section table entry.
Definition: elf32.h:34
elf32_half e_ehsize
The size of this header.
Definition: elf32.h:31
elf32_half e_shstrndx
Section header index of the string table for section header names.
Definition: elf32.h:36
elf32_word e_version
Must contain EV_CURRENT.
Definition: elf32.h:26
elf32_half e_shnum
Number of sections.
Definition: elf32.h:35
elf32_word e_entry
Virtual address of the program's entrypoint.
Definition: elf32.h:27
elf32_half e_type
Object file type.
Definition: elf32.h:24
elf32_off e_phoff
Offset to the program header table.
Definition: elf32.h:28
ELF Program header entry (segment)
Definition: elf32.h:182
elf32_addr p_paddr
Segment's physical address in memory.
Definition: elf32.h:186
elf32_word p_memsz
Size of this segment inside memory.
Definition: elf32.h:188
elf32_off p_offset
Offset to the segment's first byte in the file.
Definition: elf32.h:184
elf32_addr p_vaddr
Segment's virtual address in memory.
Definition: elf32.h:185
elf32_word p_align
Alignment requirement for the virtual load address.
Definition: elf32.h:190
elf32_word p_type
The segment's type.
Definition: elf32.h:183
elf32_word p_filesz
Size of this segment inside the file.
Definition: elf32.h:187
elf32_word p_pflags
A combination of p_pflags.
Definition: elf32.h:189
ELF section header.
Definition: elf32.h:102
elf32_addr sh_addr
Offset to the section's location inside memory.
Definition: elf32.h:106
elf32_word sh_name
Offset to this section's name inside the name table.
Definition: elf32.h:103
elf32_word sh_type
Section type.
Definition: elf32.h:104
elf32_word sh_flags
1-bit flag that describes the section's attributes
Definition: elf32.h:105
elf32_word sh_size
Size of the section.
Definition: elf32.h:108
elf32_word sh_addralign
Alignment requirement for the section's starting address.
Definition: elf32.h:111
elf32_off sh_offset
Offset to the section's location inside the file.
Definition: elf32.h:107
Symbol table entry.
Definition: elf32.h:142
elf32_half st_shndx
Index of the section containing the symbol.
Definition: elf32.h:148
elf32_word st_name
Symbol name's offset inside the symbol string table.
Definition: elf32.h:143
elf32_addr st_value
Can be an absolute value, address, etc (context)
Definition: elf32.h:144
unsigned char st_other
No meaning. Always 0.
Definition: elf32.h:147
unsigned char st_info
Symbol's type and binding attributes.
Definition: elf32.h:146
elf32_word st_size
Data object's size (if any)
Definition: elf32.h:145