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:
parent
d6b8c5dbd9
commit
084b3247a0
3 changed files with 7 additions and 1 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
|
|
@ -56,3 +56,8 @@ abi_ulong get_elf_hwcap(CPUState *cs)
|
|||
|
||||
return hwcaps;
|
||||
}
|
||||
|
||||
const char *get_elf_platform(CPUState *cs)
|
||||
{
|
||||
return "loongarch";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,6 @@
|
|||
#define LOONGARCH_TARGET_ELF_H
|
||||
|
||||
#define HAVE_ELF_HWCAP 1
|
||||
#define HAVE_ELF_PLATFORM 1
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue