mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +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
|
@ -49,7 +49,7 @@ static bool should_make_executable_exception_for_dynamic_loader(bool make_readab
|
|||
auto& inode_vm = static_cast<const InodeVMObject&>(region.vmobject());
|
||||
auto& inode = inode_vm.inode();
|
||||
|
||||
Elf32_Ehdr header;
|
||||
ElfW(Ehdr) header;
|
||||
auto buffer = UserOrKernelBuffer::for_kernel_buffer((u8*)&header);
|
||||
auto result = inode.read_bytes(0, sizeof(header), buffer, nullptr);
|
||||
if (result.is_error() || result.value() != sizeof(header))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue