summaryrefslogtreecommitdiffstats
path: root/linux-user/ppc
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2014-05-29 09:12:19 -0500
committerAlexander Graf <agraf@suse.de>2014-06-16 13:24:40 +0200
commitd90b94cd78af672cdfd52dc3789ab249534c2f40 (patch)
tree447f45edd3c9ddaef66ae7e3d58c60d98595889d /linux-user/ppc
parenta721d390b302a383a99224e08d12caad2e97d7ab (diff)
downloadhqemu-d90b94cd78af672cdfd52dc3789ab249534c2f40.zip
hqemu-d90b94cd78af672cdfd52dc3789ab249534c2f40.tar.gz
target-ppc: Support little-endian PPC64 in user mode.
Look at ELF header to determine ABI version on PPC64. This is required for executing the first instruction correctly. Also print correct machine name in uname() system call. Signed-off-by: Doug Kwan <dougkwan@google.com> Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'linux-user/ppc')
-rw-r--r--linux-user/ppc/syscall.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/ppc/syscall.h b/linux-user/ppc/syscall.h
index 6514c63..db92bbe 100644
--- a/linux-user/ppc/syscall.h
+++ b/linux-user/ppc/syscall.h
@@ -58,8 +58,12 @@ struct target_revectored_struct {
*/
#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
+#ifdef TARGET_WORDS_BIGENDIAN
#define UNAME_MACHINE "ppc64"
#else
+#define UNAME_MACHINE "ppc64le"
+#endif
+#else
#define UNAME_MACHINE "ppc"
#endif
#define UNAME_MINIMUM_RELEASE "2.6.32"
OpenPOWER on IntegriCloud