mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
Kernel+LibELF: Add support for validating and loading ELF64 executables
This commit is contained in:
parent
e35b060501
commit
158355e0d7
13 changed files with 109 additions and 78 deletions
|
@ -35,8 +35,8 @@ static void perform_self_relocations(auxv_t* auxvp)
|
|||
}
|
||||
}
|
||||
VERIFY(found_base_address);
|
||||
Elf32_Ehdr* header = (Elf32_Ehdr*)(base_address);
|
||||
Elf32_Phdr* pheader = (Elf32_Phdr*)(base_address + header->e_phoff);
|
||||
ElfW(Ehdr)* header = (ElfW(Ehdr)*)(base_address);
|
||||
ElfW(Phdr)* pheader = (ElfW(Phdr)*)(base_address + header->e_phoff);
|
||||
u32 dynamic_section_addr = 0;
|
||||
for (size_t i = 0; i < (size_t)header->e_phnum; ++i, ++pheader) {
|
||||
if (pheader->p_type != PT_DYNAMIC)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue