]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
linux-user/loongarch64: Create get_elf_platform
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 28 Jul 2025 19:00:52 +0000 (09:00 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 27 Aug 2025 20:39:25 +0000 (06:39 +1000)
Move the string literal to a new function.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/elfload.c
linux-user/loongarch64/elfload.c
linux-user/loongarch64/target_elf.h

index 0e41737cf1bfd4e7cb00574cdf1363652d1a5bab..9d61feae3016f2a7dbee977cd3370e21a170b24a 100644 (file)
@@ -665,7 +665,7 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs,
 #define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE        4096
 
-#define ELF_PLATFORM "loongarch"
+#define ELF_PLATFORM get_elf_platform(thread_cpu)
 
 #endif /* TARGET_LOONGARCH64 */
 
index ee4a85b8d6c422514f60cd775093fc2f709127d0..911352840f71070ef2e36230368c54a60e78b9c9 100644 (file)
@@ -56,3 +56,8 @@ abi_ulong get_elf_hwcap(CPUState *cs)
 
     return hwcaps;
 }
+
+const char *get_elf_platform(CPUState *cs)
+{
+    return "loongarch";
+}
index 037740d36f24aa2cec763316cbb19b818dd49ef3..eb179273255a716df67331c2bf9c8e1ad29b2c22 100644 (file)
@@ -7,5 +7,6 @@
 #define LOONGARCH_TARGET_ELF_H
 
 #define HAVE_ELF_HWCAP          1
+#define HAVE_ELF_PLATFORM       1
 
 #endif