Move the string literal to a new function.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/elfload.c | 2 +-
linux-user/loongarch64/elfload.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 2e1c12f247..7591ec3fb6 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -672,7 +672,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 */
diff --git a/linux-user/loongarch64/elfload.c b/linux-user/loongarch64/elfload.c
index f27992459b..450e567c72 100644
--- a/linux-user/loongarch64/elfload.c
+++ b/linux-user/loongarch64/elfload.c
@@ -51,3 +51,8 @@ abi_ulong get_elf_hwcap(CPUState *cs)
return hwcaps;
}
+
+const char *get_elf_platform(CPUState *cs)
+{
+ return "loongarch";
+}
--
2.43.0