add a comment
This commit is contained in:
parent
ee712432bd
commit
83982a24e2
@ -67,7 +67,9 @@ ELFImage* ELFLoader::load_elf_from_vfs(VFS::Node* node)
|
|||||||
{
|
{
|
||||||
Elf64_Ehdr elf_ehdr;
|
Elf64_Ehdr elf_ehdr;
|
||||||
ASSERT(VFS::read(node, 0, sizeof(elf_ehdr), (char*)&elf_ehdr) >= 0);
|
ASSERT(VFS::read(node, 0, sizeof(elf_ehdr), (char*)&elf_ehdr) >= 0);
|
||||||
ASSERT(strncmp((const char*)elf_ehdr.e_ident, ELFMAG, SELFMAG) == 0);
|
ASSERT(strncmp((const char*)elf_ehdr.e_ident, ELFMAG, SELFMAG) ==
|
||||||
|
0); // If you haven't checked the ELF executable with check_elf_image() first, then an assertion fail is your
|
||||||
|
// fault =D
|
||||||
ASSERT(elf_ehdr.e_ident[EI_CLASS] == ELFCLASS64);
|
ASSERT(elf_ehdr.e_ident[EI_CLASS] == ELFCLASS64);
|
||||||
ASSERT(elf_ehdr.e_ident[EI_DATA] == ELFDATA2LSB);
|
ASSERT(elf_ehdr.e_ident[EI_DATA] == ELFDATA2LSB);
|
||||||
ASSERT(elf_ehdr.e_type == ET_EXEC);
|
ASSERT(elf_ehdr.e_type == ET_EXEC);
|
||||||
|
Loading…
Reference in New Issue
Block a user