[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/18] User mode support for Linux ELF files with no
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PULL 18/18] User mode support for Linux ELF files with no section header |
Date: |
Mon, 9 Jun 2014 15:46:43 +0300 |
From: Craig Heffner <address@hidden>
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>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/elfload.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 03a8719..b405b7f 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1272,7 +1272,6 @@ static bool elf_check_ehdr(struct elfhdr *ehdr)
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));
}
--
2.0.0.rc2
- [Qemu-devel] [PULL 00/18] linux-user fixes, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 02/18] signal/x86/setup_frame: __put_user cleanup, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 17/18] linux-user: Return correct errno for unsupported netlink socket, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 10/18] signal/ppc/{save, restore}_user_regs remove __put/get error checks, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 12/18] signal/ppc/do_setcontext remove __get_user return check, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 13/18] linux-user: fix gcc-4.9 compiler error on __{get, put]}_user, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 08/18] signal/all/do_sigreturn - remove __get_user checks, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 01/18] signal/all: remove __get/__put_user return value reading, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 18/18] User mode support for Linux ELF files with no section header,
riku . voipio <=
- [Qemu-devel] [PULL 07/18] signal/all/do_sigaltstack remove __get_user value check, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 03/18] signal/all: remove return value from copy_siginfo_to_user, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 06/18] signal/sparc/restore_fpu_state: remove, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 05/18] signal/all: remove return value from restore_sigcontext, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 15/18] linux-user: Don't overrun guest buffer in sched_getaffinity, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 14/18] linux-user/uname: Return correct uname string for x86_64, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 11/18] signal/sparc64_set_context: remove __get_user checks, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 16/18] linux-user: Tell guest about big host page sizes, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 04/18] signal/all: remove return value from setup_sigcontext, riku . voipio, 2014/06/09
- [Qemu-devel] [PULL 09/18] signal/all/setup_frame remove __put_user checks, riku . voipio, 2014/06/09