summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorRichard Henderson2010-04-23 02:24:58 +0200
committerBlue Swirl2010-04-25 14:59:30 +0200
commit6495a044575c01aee960c54e8a138ac51ed8a835 (patch)
treebd4d4c36fa6e083ffb003874a5d0cae3bdc2dbf4 /linux-user
parenttcg/arm: fix condition in zero/sign extension functions (diff)
downloadqemu-6495a044575c01aee960c54e8a138ac51ed8a835.tar.gz
qemu-6495a044575c01aee960c54e8a138ac51ed8a835.tar.xz
qemu-6495a044575c01aee960c54e8a138ac51ed8a835.zip
linux-user: Remove ELFLOAD32.
The ABI-specific types used by linux_binprm and image_info are different after forcing TARGET_ABI32 on. Which means that the parameters that load_elf_binary_multi sees are not those that loader_exec passed. This is inherently broken and is more trouble than it's worth fixing. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/elfload32.c30
-rw-r--r--linux-user/linuxload.c6
-rw-r--r--linux-user/qemu.h5
3 files changed, 1 insertions, 40 deletions
diff --git a/linux-user/elfload32.c b/linux-user/elfload32.c
deleted file mode 100644
index 4b4648c759..0000000000
--- a/linux-user/elfload32.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#define TARGET_ABI32
-#define load_elf_binary load_elf_binary32
-#define do_init_thread do_init_thread32
-
-#include "elfload.c"
-
-#undef load_elf_binary
-#undef do_init_thread
-
-int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs,
- struct image_info *info);
-
-int load_elf_binary_multi(struct linux_binprm *bprm,
- struct target_pt_regs *regs,
- struct image_info *info)
-{
- struct elfhdr *elf_ex;
- int retval;
-
- elf_ex = (struct elfhdr *) bprm->buf; /* exec-header */
- if (elf_ex->e_ident[EI_CLASS] == ELFCLASS64) {
- retval = load_elf_binary(bprm, regs, info);
- } else {
- retval = load_elf_binary32(bprm, regs, info);
- if (personality(info->personality) == PER_LINUX)
- info->personality = PER_LINUX32;
- }
-
- return retval;
-}
diff --git a/linux-user/linuxload.c b/linux-user/linuxload.c
index 2d778a2ced..13ad9aaebe 100644
--- a/linux-user/linuxload.c
+++ b/linux-user/linuxload.c
@@ -184,11 +184,7 @@ int loader_exec(const char * filename, char ** argv, char ** envp,
&& bprm->buf[1] == 'E'
&& bprm->buf[2] == 'L'
&& bprm->buf[3] == 'F') {
-#ifndef TARGET_HAS_ELFLOAD32
- retval = load_elf_binary(bprm,regs,infop);
-#else
- retval = load_elf_binary_multi(bprm, regs, infop);
-#endif
+ retval = load_elf_binary(bprm, regs, infop);
#if defined(TARGET_HAS_BFLT)
} else if (bprm->buf[0] == 'b'
&& bprm->buf[1] == 'F'
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 47fc686dd0..dab3597cc6 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -171,11 +171,6 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
struct image_info * info);
int load_flt_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
struct image_info * info);
-#ifdef TARGET_HAS_ELFLOAD32
-int load_elf_binary_multi(struct linux_binprm *bprm,
- struct target_pt_regs *regs,
- struct image_info *info);
-#endif
abi_long memcpy_to_target(abi_ulong dest, const void *src,
unsigned long len);