Linux kernels must be ET_EXEC
This commit is contained in:
@@ -137,6 +137,7 @@ PackLinuxElf64::checkEhdr(Elf64_Ehdr const *ehdr) const
|
|||||||
if (get_te16(&ehdr->e_phentsize) != sizeof(Elf64_Phdr))
|
if (get_te16(&ehdr->e_phentsize) != sizeof(Elf64_Phdr))
|
||||||
return 6;
|
return 6;
|
||||||
|
|
||||||
|
if (type == Elf64_Ehdr::ET_EXEC) {
|
||||||
// check for Linux kernels
|
// check for Linux kernels
|
||||||
acc_uint64l_t const entry = get_te64(&ehdr->e_entry);
|
acc_uint64l_t const entry = get_te64(&ehdr->e_entry);
|
||||||
if (entry == 0xC0100000) // uncompressed vmlinux
|
if (entry == 0xC0100000) // uncompressed vmlinux
|
||||||
@@ -145,6 +146,7 @@ PackLinuxElf64::checkEhdr(Elf64_Ehdr const *ehdr) const
|
|||||||
return 1001;
|
return 1001;
|
||||||
if (entry == 0x00100000) // compressed bvmlinux
|
if (entry == 0x00100000) // compressed bvmlinux
|
||||||
return 1002;
|
return 1002;
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME: add more checks for kernels
|
// FIXME: add more checks for kernels
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user