[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] User mode support for Linux ELF files with no section hea
From: |
Craig |
Subject: |
[Qemu-trivial] User mode support for Linux ELF files with no section headers |
Date: |
Mon, 5 Dec 2011 14:14:27 -0500 |
In user mode Linux, Qemu currently refuses to load ELF files that do not
contain section headers (ehdr->e_shentsize == 0). Since section headers are not
required in order to load an ELF file, simply removing the e_shentsize check in
elf_check_ehdr() allows ELF binaries with no section headers to be run properly
in user mode:
Signed-off-by: Craig Heffner <address@hidden>
--- qemu/linux-user/elfload.c 2011-12-02 15:16:07.637541215 -0500
+++ qemu-patched/linux-user/elfload.c 2011-12-02 15:27:24.061522798 -0500
@@ -1068,7 +1068,6 @@ static bool elf_check_ehdr(struct elfhdr
return (elf_check_arch(ehdr->e_machine)
&& ehdr->e_ehsize == sizeof(struct elfhdr)
&& ehdr->e_phentsize == sizeof(struct elf_phdr)
- && ehdr->e_shentsize == sizeof(struct elf_shdr)
&& (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN));
}
smime.p7s
Description: S/MIME cryptographic signature
- [Qemu-trivial] User mode support for Linux ELF files with no section headers,
Craig <=