linux-user: Remove ELF_START_MMAP and image_info.start_mmap
The start_mmap value is write-only. Remove the field and the defines that populated it. Logically, this has been replaced by task_unmapped_base. Tested-by: Helge Deller <deller@gmx.de> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
6467d9eb49
commit
f6d4554242
@ -143,8 +143,6 @@ static uint32_t get_elf_hwcap(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TARGET_X86_64
|
#ifdef TARGET_X86_64
|
||||||
#define ELF_START_MMAP 0x2aaaaab000ULL
|
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS64
|
#define ELF_CLASS ELFCLASS64
|
||||||
#define ELF_ARCH EM_X86_64
|
#define ELF_ARCH EM_X86_64
|
||||||
|
|
||||||
@ -221,8 +219,6 @@ static bool init_guest_commpage(void)
|
|||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is used to ensure we don't load something for the wrong architecture.
|
* This is used to ensure we don't load something for the wrong architecture.
|
||||||
*/
|
*/
|
||||||
@ -308,8 +304,6 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUX86State *en
|
|||||||
#ifndef TARGET_AARCH64
|
#ifndef TARGET_AARCH64
|
||||||
/* 32 bit ARM definitions */
|
/* 32 bit ARM definitions */
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
#define ELF_ARCH EM_ARM
|
#define ELF_ARCH EM_ARM
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
#define EXSTACK_DEFAULT true
|
#define EXSTACK_DEFAULT true
|
||||||
@ -600,7 +594,6 @@ static const char *get_elf_platform(void)
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
/* 64 bit ARM definitions */
|
/* 64 bit ARM definitions */
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
#define ELF_ARCH EM_AARCH64
|
#define ELF_ARCH EM_AARCH64
|
||||||
#define ELF_CLASS ELFCLASS64
|
#define ELF_CLASS ELFCLASS64
|
||||||
@ -871,7 +864,6 @@ const char *elf_hwcap2_str(uint32_t bit)
|
|||||||
#ifdef TARGET_SPARC
|
#ifdef TARGET_SPARC
|
||||||
#ifdef TARGET_SPARC64
|
#ifdef TARGET_SPARC64
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
#define ELF_HWCAP (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | HWCAP_SPARC_SWAP \
|
#define ELF_HWCAP (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | HWCAP_SPARC_SWAP \
|
||||||
| HWCAP_SPARC_MULDIV | HWCAP_SPARC_V9)
|
| HWCAP_SPARC_MULDIV | HWCAP_SPARC_V9)
|
||||||
#ifndef TARGET_ABI32
|
#ifndef TARGET_ABI32
|
||||||
@ -883,7 +875,6 @@ const char *elf_hwcap2_str(uint32_t bit)
|
|||||||
#define ELF_CLASS ELFCLASS64
|
#define ELF_CLASS ELFCLASS64
|
||||||
#define ELF_ARCH EM_SPARCV9
|
#define ELF_ARCH EM_SPARCV9
|
||||||
#else
|
#else
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
#define ELF_HWCAP (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | HWCAP_SPARC_SWAP \
|
#define ELF_HWCAP (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | HWCAP_SPARC_SWAP \
|
||||||
| HWCAP_SPARC_MULDIV)
|
| HWCAP_SPARC_MULDIV)
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
@ -905,7 +896,6 @@ static inline void init_thread(struct target_pt_regs *regs,
|
|||||||
#ifdef TARGET_PPC
|
#ifdef TARGET_PPC
|
||||||
|
|
||||||
#define ELF_MACHINE PPC_ELF_MACHINE
|
#define ELF_MACHINE PPC_ELF_MACHINE
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
#if defined(TARGET_PPC64)
|
#if defined(TARGET_PPC64)
|
||||||
|
|
||||||
@ -1108,8 +1098,6 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUPPCState *en
|
|||||||
|
|
||||||
#ifdef TARGET_LOONGARCH64
|
#ifdef TARGET_LOONGARCH64
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS64
|
#define ELF_CLASS ELFCLASS64
|
||||||
#define ELF_ARCH EM_LOONGARCH
|
#define ELF_ARCH EM_LOONGARCH
|
||||||
#define EXSTACK_DEFAULT true
|
#define EXSTACK_DEFAULT true
|
||||||
@ -1200,8 +1188,6 @@ static uint32_t get_elf_hwcap(void)
|
|||||||
|
|
||||||
#ifdef TARGET_MIPS
|
#ifdef TARGET_MIPS
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
#ifdef TARGET_MIPS64
|
#ifdef TARGET_MIPS64
|
||||||
#define ELF_CLASS ELFCLASS64
|
#define ELF_CLASS ELFCLASS64
|
||||||
#else
|
#else
|
||||||
@ -1359,8 +1345,6 @@ static uint32_t get_elf_hwcap(void)
|
|||||||
|
|
||||||
#ifdef TARGET_MICROBLAZE
|
#ifdef TARGET_MICROBLAZE
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
#define elf_check_arch(x) ( (x) == EM_MICROBLAZE || (x) == EM_MICROBLAZE_OLD)
|
#define elf_check_arch(x) ( (x) == EM_MICROBLAZE || (x) == EM_MICROBLAZE_OLD)
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
@ -1401,8 +1385,6 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUMBState *env
|
|||||||
|
|
||||||
#ifdef TARGET_NIOS2
|
#ifdef TARGET_NIOS2
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
#define elf_check_arch(x) ((x) == EM_ALTERA_NIOS2)
|
#define elf_check_arch(x) ((x) == EM_ALTERA_NIOS2)
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
@ -1498,8 +1480,6 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs,
|
|||||||
|
|
||||||
#ifdef TARGET_OPENRISC
|
#ifdef TARGET_OPENRISC
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x08000000
|
|
||||||
|
|
||||||
#define ELF_ARCH EM_OPENRISC
|
#define ELF_ARCH EM_OPENRISC
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
#define ELF_DATA ELFDATA2MSB
|
#define ELF_DATA ELFDATA2MSB
|
||||||
@ -1536,8 +1516,6 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs,
|
|||||||
|
|
||||||
#ifdef TARGET_SH4
|
#ifdef TARGET_SH4
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
#define ELF_ARCH EM_SH
|
#define ELF_ARCH EM_SH
|
||||||
|
|
||||||
@ -1618,8 +1596,6 @@ static uint32_t get_elf_hwcap(void)
|
|||||||
|
|
||||||
#ifdef TARGET_CRIS
|
#ifdef TARGET_CRIS
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
#define ELF_ARCH EM_CRIS
|
#define ELF_ARCH EM_CRIS
|
||||||
|
|
||||||
@ -1635,8 +1611,6 @@ static inline void init_thread(struct target_pt_regs *regs,
|
|||||||
|
|
||||||
#ifdef TARGET_M68K
|
#ifdef TARGET_M68K
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
#define ELF_ARCH EM_68K
|
#define ELF_ARCH EM_68K
|
||||||
|
|
||||||
@ -1686,8 +1660,6 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUM68KState *e
|
|||||||
|
|
||||||
#ifdef TARGET_ALPHA
|
#ifdef TARGET_ALPHA
|
||||||
|
|
||||||
#define ELF_START_MMAP (0x30000000000ULL)
|
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS64
|
#define ELF_CLASS ELFCLASS64
|
||||||
#define ELF_ARCH EM_ALPHA
|
#define ELF_ARCH EM_ALPHA
|
||||||
|
|
||||||
@ -1705,8 +1677,6 @@ static inline void init_thread(struct target_pt_regs *regs,
|
|||||||
|
|
||||||
#ifdef TARGET_S390X
|
#ifdef TARGET_S390X
|
||||||
|
|
||||||
#define ELF_START_MMAP (0x20000000000ULL)
|
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS64
|
#define ELF_CLASS ELFCLASS64
|
||||||
#define ELF_DATA ELFDATA2MSB
|
#define ELF_DATA ELFDATA2MSB
|
||||||
#define ELF_ARCH EM_S390
|
#define ELF_ARCH EM_S390
|
||||||
@ -1817,7 +1787,6 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs,
|
|||||||
|
|
||||||
#ifdef TARGET_RISCV
|
#ifdef TARGET_RISCV
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
#define ELF_ARCH EM_RISCV
|
#define ELF_ARCH EM_RISCV
|
||||||
|
|
||||||
#ifdef TARGET_RISCV32
|
#ifdef TARGET_RISCV32
|
||||||
@ -1853,7 +1822,6 @@ static inline void init_thread(struct target_pt_regs *regs,
|
|||||||
|
|
||||||
#ifdef TARGET_HPPA
|
#ifdef TARGET_HPPA
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x80000000
|
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
#define ELF_ARCH EM_PARISC
|
#define ELF_ARCH EM_PARISC
|
||||||
#define ELF_PLATFORM "PARISC"
|
#define ELF_PLATFORM "PARISC"
|
||||||
@ -1905,8 +1873,6 @@ static bool init_guest_commpage(void)
|
|||||||
|
|
||||||
#ifdef TARGET_XTENSA
|
#ifdef TARGET_XTENSA
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x20000000
|
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
#define ELF_ARCH EM_XTENSA
|
#define ELF_ARCH EM_XTENSA
|
||||||
|
|
||||||
@ -1972,8 +1938,6 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs,
|
|||||||
|
|
||||||
#ifdef TARGET_HEXAGON
|
#ifdef TARGET_HEXAGON
|
||||||
|
|
||||||
#define ELF_START_MMAP 0x20000000
|
|
||||||
|
|
||||||
#define ELF_CLASS ELFCLASS32
|
#define ELF_CLASS ELFCLASS32
|
||||||
#define ELF_ARCH EM_HEXAGON
|
#define ELF_ARCH EM_HEXAGON
|
||||||
|
|
||||||
@ -3690,8 +3654,6 @@ int load_elf_binary(struct linux_binprm *bprm, struct image_info *info)
|
|||||||
interp_info.fp_abi = MIPS_ABI_FP_UNKNOWN;
|
interp_info.fp_abi = MIPS_ABI_FP_UNKNOWN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
info->start_mmap = (abi_ulong)ELF_START_MMAP;
|
|
||||||
|
|
||||||
load_elf_image(bprm->filename, bprm->fd, info,
|
load_elf_image(bprm->filename, bprm->fd, info,
|
||||||
&elf_interpreter, bprm->buf);
|
&elf_interpreter, bprm->buf);
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ struct image_info {
|
|||||||
abi_ulong start_data;
|
abi_ulong start_data;
|
||||||
abi_ulong end_data;
|
abi_ulong end_data;
|
||||||
abi_ulong brk;
|
abi_ulong brk;
|
||||||
abi_ulong start_mmap;
|
|
||||||
abi_ulong start_stack;
|
abi_ulong start_stack;
|
||||||
abi_ulong stack_limit;
|
abi_ulong stack_limit;
|
||||||
abi_ulong entry;
|
abi_ulong entry;
|
||||||
|
Loading…
Reference in New Issue
Block a user