提交 1e6ed54e 编写于 作者: B Bharata B Rao 提交者: Alexander Graf

target-ppc: Set the correct endianness in ELF dump header

Signed-off-by: NBharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: NAlexander Graf <agraf@suse.de>
Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: NAlexander Graf <agraf@suse.de>
上级 382d2db6
......@@ -209,12 +209,16 @@ typedef struct NoteFuncDescStruct NoteFuncDesc;
int cpu_get_dump_info(ArchDumpInfo *info,
const struct GuestPhysBlockList *guest_phys_blocks)
{
/*
* Currently only handling PPC64 big endian.
*/
PowerPCCPU *cpu = POWERPC_CPU(first_cpu);
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
info->d_machine = EM_PPC64;
info->d_endian = ELFDATA2MSB;
info->d_class = ELFCLASS64;
if ((*pcc->interrupts_big_endian)(cpu)) {
info->d_endian = ELFDATA2MSB;
} else {
info->d_endian = ELFDATA2LSB;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册