Mahesh Jagannath Salgaonkar [off-list ref] writes:
On 09/08/2016 12:30 PM, Mahesh Jagannath Salgaonkar wrote:
quoted
On 09/06/2016 11:02 AM, Daniel Axtens wrote:
quoted
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 0638b82ce294..457f08e544c6 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -779,7 +779,11 @@ static int fadump_init_elfcore_header(char *bufp)
elf->e_entry = 0;
elf->e_phoff = sizeof(struct elfhdr);
elf->e_shoff = 0;
- elf->e_flags = ELF_CORE_EFLAGS;
+#ifdef __LITTLE_ENDIAN__
Wouldn't '#ifdef PPC64_ELF_ABI_v2' be more appropriate here ?
Hari just pointed out to me that the upstream commit
[https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?id=918d0355]
introduces ELF_CORE_EFLAGS with correct values.
No that's wrong in this case.
It does:
+#define ELF_CORE_EFLAGS (is_elf2_task() ? 2 : 0)
We are generating a core file for *the kernel itself*. So using
is_elf2_task() is wrong. We need to know if the kernel is built v2 or
not, not whether the currently running process is v2.
cheers