Rename to elf_check_machine to match ELF_MACHINE.
Remove the unnecessary definition for loongarch64.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
#endif
typedef abi_int target_pid_t;
-#ifndef elf_check_arch
-#define elf_check_arch(x) ((x) == ELF_MACHINE)
+#ifndef elf_check_machine
+#define elf_check_machine(x) ((x) == ELF_MACHINE)
#endif
#ifndef elf_check_abi
This has to wait until after bswapping the header. */
static bool elf_check_ehdr(struct elfhdr *ehdr)
{
- return (elf_check_arch(ehdr->e_machine)
+ return (elf_check_machine(ehdr->e_machine)
&& elf_check_abi(ehdr->e_flags)
&& ehdr->e_ehsize == sizeof(struct elfhdr)
&& ehdr->e_phentsize == sizeof(struct elf_phdr)
/*
* This is used to ensure we don't load something for the wrong architecture.
*/
-#define elf_check_arch(x) ((x) == EM_386 || (x) == EM_486)
+#define elf_check_machine(x) ((x) == EM_386 || (x) == EM_486)
/*
* i386 is the only target which supplies AT_SYSINFO for the vdso.
#define ELF_CLASS ELFCLASS64
#define ELF_MACHINE EM_LOONGARCH
#define EXSTACK_DEFAULT true
-#define elf_check_arch(x) ((x) == EM_LOONGARCH)
#define VDSO_HEADER "vdso.c.inc"
#define HAVE_ELF_HWCAP 1
#define ELF_CLASS ELFCLASS32
#define ELF_MACHINE EM_MICROBLAZE
-#define elf_check_arch(x) ((x) == EM_MICROBLAZE || (x) == EM_MICROBLAZE_OLD)
+#define elf_check_machine(x) ((x) == EM_MICROBLAZE || (x) == EM_MICROBLAZE_OLD)
#define HAVE_ELF_CORE_DUMP 1
# define ELF_MACHINE EM_SPARC
#elif defined(TARGET_ABI32)
# define ELF_CLASS ELFCLASS32
-# define elf_check_arch(x) ((x) == EM_SPARC32PLUS || (x) == EM_SPARC)
+# define elf_check_machine(x) ((x) == EM_SPARC32PLUS || (x) == EM_SPARC)
#else
# define ELF_CLASS ELFCLASS64
# define ELF_MACHINE EM_SPARCV9