[PATCH 17/89] linux-user/hppa: Create get_elf_platform

Richard Henderson posted 89 patches 3 months, 2 weeks ago
Maintainers: Riku Voipio <riku.voipio@iki.fi>, Laurent Vivier <laurent@vivier.eu>, Brian Cain <brian.cain@oss.qualcomm.com>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
[PATCH 17/89] linux-user/hppa: Create get_elf_platform
Posted by Richard Henderson 3 months, 2 weeks ago
Move the string literal to a new function.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 linux-user/elfload.c      |  2 +-
 linux-user/hppa/elfload.c | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 7591ec3fb6..58f4b642a5 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1053,7 +1053,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 73fa78ef14..ff0c2b862a 100644
--- a/linux-user/hppa/elfload.c
+++ b/linux-user/hppa/elfload.c
@@ -1 +1,11 @@
 /* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include "qemu/osdep.h"
+#include "qemu.h"
+#include "loader.h"
+
+
+const char *get_elf_platform(CPUState *cs)
+{
+    return "PARISC";
+}
-- 
2.43.0
Re: [PATCH 17/89] linux-user/hppa: Create get_elf_platform
Posted by Peter Maydell 3 months, 2 weeks ago
On Wed, 30 Jul 2025 at 01:14, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Move the string literal to a new function.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  linux-user/elfload.c      |  2 +-
>  linux-user/hppa/elfload.c | 10 ++++++++++
>  2 files changed, 11 insertions(+), 1 deletion(-)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM