Data Fields | |
bfelf64_word | perm |
bfelf64_off | mem_offset |
bfelf64_off | file_offset |
bfelf64_xword | memsz |
bfelf64_xword | filesz |
bfelf64_addr | virt_addr |
ELF Load Segment
The load instructions that each segment provides is missing some helpful info. This structure provides the info that is needed, in a cleaned up format.
Note that there are two different char * buffers that you need to know about when loading a segment. There is the char * for the ELF file, and the char * for the memory that the ELF file is being loaded into. The ELF file does not equal memory. The best example is the BSS section, which is empty in the ELF file. Also, the RE vs RW sections are usually aligned. To use this information use the following steps:
Definition at line 207 of file bfelf_loader.h.
bfelf_load_instr::perm |
defines the permissions (read/write/execute) for this segment
Definition at line 209 of file bfelf_loader.h.
bfelf_load_instr::mem_offset |
defines the segment offset in memory
Definition at line 210 of file bfelf_loader.h.
bfelf_load_instr::file_offset |
defines the segment offset in the ELF file
Definition at line 211 of file bfelf_loader.h.
bfelf_load_instr::memsz |
defines the segment size in memory
Definition at line 212 of file bfelf_loader.h.
bfelf_load_instr::filesz |
defines the segment size in the ELF file
Definition at line 213 of file bfelf_loader.h.
bfelf_load_instr::virt_addr |
defines the assumed virtual address of the segment if PIC == false
Definition at line 214 of file bfelf_loader.h.