qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/4] ppc64 dump: Set the correct endianness in ELF d


From: Greg Kurz
Subject: [Qemu-devel] [PATCH 4/4] ppc64 dump: Set the correct endianness in ELF dump header
Date: Mon, 28 Apr 2014 13:29:52 +0200
User-agent: StGit/0.16

From: Bharata B Rao <address@hidden>

Signed-off-by: Bharata B Rao <address@hidden>
[ use ppc_cpu_interrupts_big_endian(),
  Greg Kurz <address@hidden> ]
Signed-off-by: Greg Kurz <address@hidden>
---
 target-ppc/arch_dump.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/target-ppc/arch_dump.c b/target-ppc/arch_dump.c
index a85c872..b2e1fbc 100644
--- a/target-ppc/arch_dump.c
+++ b/target-ppc/arch_dump.c
@@ -183,12 +183,13 @@ typedef struct NoteFuncDescStruct NoteFuncDesc;
 int cpu_get_dump_info(ArchDumpInfo *info,
                       const struct GuestPhysBlockList *guest_phys_blocks)
 {
-    /*
-     * Currently only handling PPC64 big endian.
-     */
     info->d_machine = EM_PPC64;
-    info->d_endian = ELFDATA2MSB;
     info->d_class = ELFCLASS64;
+    if (ppc_cpu_interrupts_big_endian(first_cpu)) {
+        info->d_endian = ELFDATA2MSB;
+    } else {
+        info->d_endian = ELFDATA2LSB;
+    }
 
     return 0;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]