diff mbox series

[v2,2/2] linux-user: Fix ELF_PLATFORM for aarch64_be-linux-user

Message ID 20190212074840.13542-3-richard.henderson@linaro.org
State Superseded
Headers show
Series linux-user: Fix AT_PLATFORM for arm | expand

Commit Message

Richard Henderson Feb. 12, 2019, 7:48 a.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 linux-user/elfload.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
2.17.2

Comments

Laurent Vivier Feb. 12, 2019, 8:27 a.m. UTC | #1
On 12/02/2019 08:48, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>  linux-user/elfload.c | 6 +++++-

>  1 file changed, 5 insertions(+), 1 deletion(-)

> 

> diff --git a/linux-user/elfload.c b/linux-user/elfload.c

> index d796d51ec6..5aa0628ae9 100644

> --- a/linux-user/elfload.c

> +++ b/linux-user/elfload.c

> @@ -537,7 +537,11 @@ static const char *get_elf_platform(void)

>  

>  #define ELF_ARCH        EM_AARCH64

>  #define ELF_CLASS       ELFCLASS64

> -#define ELF_PLATFORM    "aarch64"

> +#ifdef TARGET_WORDS_BIGENDIAN

> +# define ELF_PLATFORM    "aarch64_be"

> +#else

> +# define ELF_PLATFORM    "aarch64"

> +#endif

>  

>  static inline void init_thread(struct target_pt_regs *regs,

>                                 struct image_info *infop)

> 


Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Laurent Vivier Feb. 14, 2019, 9:25 a.m. UTC | #2
On 12/02/2019 08:48, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>  linux-user/elfload.c | 6 +++++-

>  1 file changed, 5 insertions(+), 1 deletion(-)

> 

> diff --git a/linux-user/elfload.c b/linux-user/elfload.c

> index d796d51ec6..5aa0628ae9 100644

> --- a/linux-user/elfload.c

> +++ b/linux-user/elfload.c

> @@ -537,7 +537,11 @@ static const char *get_elf_platform(void)

>  

>  #define ELF_ARCH        EM_AARCH64

>  #define ELF_CLASS       ELFCLASS64

> -#define ELF_PLATFORM    "aarch64"

> +#ifdef TARGET_WORDS_BIGENDIAN

> +# define ELF_PLATFORM    "aarch64_be"

> +#else

> +# define ELF_PLATFORM    "aarch64"

> +#endif

>  

>  static inline void init_thread(struct target_pt_regs *regs,

>                                 struct image_info *infop)

> 


Applied to my linux-user branch.

Thanks,
Laurent
diff mbox series

Patch

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index d796d51ec6..5aa0628ae9 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -537,7 +537,11 @@  static const char *get_elf_platform(void)
 
 #define ELF_ARCH        EM_AARCH64
 #define ELF_CLASS       ELFCLASS64
-#define ELF_PLATFORM    "aarch64"
+#ifdef TARGET_WORDS_BIGENDIAN
+# define ELF_PLATFORM    "aarch64_be"
+#else
+# define ELF_PLATFORM    "aarch64"
+#endif
 
 static inline void init_thread(struct target_pt_regs *regs,
                                struct image_info *infop)