From: Richard Henderson Date: Mon, 28 Jul 2025 19:06:39 +0000 (-1000) Subject: linux-user/hppa: Create get_elf_platform X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eaf983e04b342ab4c3401ad8add649ec626a0744;p=thirdparty%2Fqemu.git linux-user/hppa: Create get_elf_platform Move the string literal to a new function. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 9d61feae301..83cb6731ec8 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1046,7 +1046,7 @@ static inline void init_thread(struct target_pt_regs *regs, #define ELF_CLASS ELFCLASS32 #define ELF_ARCH EM_PARISC -#define ELF_PLATFORM "PARISC" +#define ELF_PLATFORM get_elf_platform(thread_cpu) #define STACK_GROWS_DOWN 0 #define STACK_ALIGNMENT 64 diff --git a/linux-user/hppa/elfload.c b/linux-user/hppa/elfload.c index 2274fcbde43..9dd3fe092a8 100644 --- a/linux-user/hppa/elfload.c +++ b/linux-user/hppa/elfload.c @@ -9,3 +9,8 @@ const char *get_elf_cpu_model(uint32_t eflags) { return "hppa"; } + +const char *get_elf_platform(CPUState *cs) +{ + return "PARISC"; +} diff --git a/linux-user/hppa/target_elf.h b/linux-user/hppa/target_elf.h index 5826ca2cd22..85be00584d8 100644 --- a/linux-user/hppa/target_elf.h +++ b/linux-user/hppa/target_elf.h @@ -8,4 +8,6 @@ #ifndef HPPA_TARGET_ELF_H #define HPPA_TARGET_ELF_H +#define HAVE_ELF_PLATFORM 1 + #endif