linux-user/loongarch64: Create get_elf_platform

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>
This commit is contained in:
Richard Henderson 2025-07-28 09:00:52 -10:00
parent d6b8c5dbd9
commit 084b3247a0
3 changed files with 7 additions and 1 deletions

View 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 */

View file

@ -56,3 +56,8 @@ abi_ulong get_elf_hwcap(CPUState *cs)
return hwcaps;
}
const char *get_elf_platform(CPUState *cs)
{
return "loongarch";
}

View file

@ -7,5 +7,6 @@
#define LOONGARCH_TARGET_ELF_H
#define HAVE_ELF_HWCAP 1
#define HAVE_ELF_PLATFORM 1
#endif