aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/fadump.c
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2016-09-06 01:32:42 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-09-13 03:36:01 -0400
commitd8bced27be25537bde3714cbdb34ccece81f6a0d (patch)
tree8af76b0e99556211d7f04253221125844deb44a1 /arch/powerpc/kernel/fadump.c
parent7c98bd72081c44670e2d0b60aed364180ebc0611 (diff)
powerpc/fadump: Set core e_flags using kernel's ELF ABI version
Firmware Assisted Dump is a facility to dump kernel core with assistance from firmware. As part of this process the kernel ELF ABI version is stored in the core file. Currently fadump.h defines this to 0 if it is not already defined. This clashes with a define in elf.h which sets it based on the current task - not based on the kernel's ELF ABI version. Use the compiler-provided #define _CALL_ELF which tells us the ELF ABI version of the kernel to set e_flags, this matches what binutils does. Remove the definition in fadump.h, which becomes unused. Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/fadump.c')
-rw-r--r--arch/powerpc/kernel/fadump.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index b3a663333d36..624ddcf728e0 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -778,7 +778,11 @@ static int fadump_init_elfcore_header(char *bufp)
778 elf->e_entry = 0; 778 elf->e_entry = 0;
779 elf->e_phoff = sizeof(struct elfhdr); 779 elf->e_phoff = sizeof(struct elfhdr);
780 elf->e_shoff = 0; 780 elf->e_shoff = 0;
781 elf->e_flags = ELF_CORE_EFLAGS; 781#if defined(_CALL_ELF)
782 elf->e_flags = _CALL_ELF;
783#else
784 elf->e_flags = 0;
785#endif
782 elf->e_ehsize = sizeof(struct elfhdr); 786 elf->e_ehsize = sizeof(struct elfhdr);
783 elf->e_phentsize = sizeof(struct elf_phdr); 787 elf->e_phentsize = sizeof(struct elf_phdr);
784 elf->e_phnum = 0; 788 elf->e_phnum = 0;