]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
linux-user: Rename elf_check_arch
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 29 Jul 2025 21:26:43 +0000 (11:26 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 29 Aug 2025 21:04:04 +0000 (07:04 +1000)
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>
linux-user/elfload.c
linux-user/i386/target_elf.h
linux-user/loongarch64/target_elf.h
linux-user/microblaze/target_elf.h
linux-user/sparc/target_elf.h

index c4817597104d270ef861715c5cb4d8ad84ff7db5..aa0eed6dea0e890c4c76d37d45b6c64cf8b13b54 100644 (file)
@@ -130,8 +130,8 @@ typedef abi_uint        target_gid_t;
 #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
@@ -346,7 +346,7 @@ static bool elf_check_ident(struct elfhdr *ehdr)
    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)
index c3caad68b91fd12b9764d0b1fa39bb18e51fd54e..eafac8f3821790f38d42d3984a9b47ae6d4cea86 100644 (file)
@@ -30,7 +30,7 @@ typedef struct target_elf_gregset_t {
 /*
  * 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.
index b9885929934282dd3cf189d14f472fddb61c302c..3aa8c83958df3742a3d7e8302853b0d0008f3172 100644 (file)
@@ -11,7 +11,6 @@
 #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
index 1ec91ea5a962107c4b6cd5d74c54cee977fe1267..7b3ef70d23288058072d72f165a5014b35a6cc69 100644 (file)
@@ -13,7 +13,7 @@
 #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
 
index 6b0cac3caf09d8ea941036fe4faf94527c8fa371..7827767bcb2b485df6b46e40524c9ec8fefac3e1 100644 (file)
@@ -13,7 +13,7 @@
 # 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