Linux kernels must be ET_EXEC
This commit is contained in:
@@ -86,6 +86,7 @@ PackLinuxElf32::checkEhdr(Elf32_Ehdr const *ehdr) const
|
||||
if (get_te16(&ehdr->e_phentsize) != sizeof(Elf32_Phdr))
|
||||
return 6;
|
||||
|
||||
if (type == Elf32_Ehdr::ET_EXEC) {
|
||||
// check for Linux kernels
|
||||
unsigned const entry = get_te32(&ehdr->e_entry);
|
||||
if (entry == 0xC0100000) // uncompressed vmlinux
|
||||
@@ -94,6 +95,7 @@ PackLinuxElf32::checkEhdr(Elf32_Ehdr const *ehdr) const
|
||||
return 1001;
|
||||
if (entry == 0x00100000) // compressed bvmlinux
|
||||
return 1002;
|
||||
}
|
||||
|
||||
// FIXME: add more checks for kernels
|
||||
|
||||
|
||||
Reference in New Issue
Block a user