diff options
author | Laurent Dufour <ldufour@linux.vnet.ibm.com> | 2014-07-25 17:07:49 +0200 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2014-09-01 09:57:58 +0900 |
commit | 45b33eb2e70cd44f41abf1058a92659cb4315011 (patch) | |
tree | f58964d61918f0f99bb5faa7b7fcbf00d5a437cd | |
parent | 046d1755d2bd723a11a180c265e61a884990712e (diff) | |
download | kexec-tools-45b33eb2e70cd44f41abf1058a92659cb4315011.tar.gz |
ppc64/kdump: Fix ELF header endianess
The ELF header created among the loading of the kdump kernel should be
flagged using the current endianess and not always as big endian.
Without this patch the data exposed in /proc/vmcore are not readable when
running in LE mode.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/ppc64/crashdump-ppc64.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kexec/arch/ppc64/crashdump-ppc64.c b/kexec/arch/ppc64/crashdump-ppc64.c index 00a0e63..6214b83 100644 --- a/kexec/arch/ppc64/crashdump-ppc64.c +++ b/kexec/arch/ppc64/crashdump-ppc64.c @@ -38,7 +38,11 @@ static struct crash_elf_info elf_info64 = { class: ELFCLASS64, +#if BYTE_ORDER == LITTLE_ENDIAN + data: ELFDATA2LSB, +#else data: ELFDATA2MSB, +#endif machine: EM_PPC64, page_offset: PAGE_OFFSET, lowmem_limit: MAXMEM, |