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 <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o
obj-$(TARGET_HAS_BFLT) += flatload.o
-obj-$(TARGET_HAS_ELFLOAD32) += elfload32.o
obj-$(TARGET_I386) += vm86.o
echo "# Automatically generated by configure - do not modify" > $config_target_mak
bflt="no"
-elfload32="no"
target_nptl="no"
interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
echo "CONFIG_QEMU_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
;;
sparc64)
TARGET_BASE_ARCH=sparc
- elfload32="yes"
target_phys_bits=64
;;
sparc32plus)
-a "$nptl" = "yes" -a "$target_nptl" = "yes"; then
echo "CONFIG_USE_NPTL=y" >> $config_target_mak
fi
-# 32 bit ELF loader in addition to native 64 bit loader?
-if test "$target_user_only" = "yes" -a "$elfload32" = "yes"; then
- echo "TARGET_HAS_ELFLOAD32=y" >> $config_target_mak
-fi
if test "$target_user_only" = "yes" -a "$guest_base" = "yes"; then
echo "CONFIG_USE_GUEST_BASE=y" >> $config_target_mak
fi
+++ /dev/null
-#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;
-}
&& 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'
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);