summaryrefslogtreecommitdiff
path: root/include/linux/elfcore.h
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2022-01-31 16:54:52 +0000
committerWill Deacon <will@kernel.org>2022-02-15 22:53:28 +0000
commitb62a8486de3ab1d7c2353ec422b9cca3abfcfbcd (patch)
tree61cd9c4ab592816b2ffb8032fb8b899cf6851dc3 /include/linux/elfcore.h
parentdfd42facf1e4ada021b939b4e19c935dcdd55566 (diff)
downloadlwn-b62a8486de3ab1d7c2353ec422b9cca3abfcfbcd.tar.gz
lwn-b62a8486de3ab1d7c2353ec422b9cca3abfcfbcd.zip
elfcore: Replace CONFIG_{IA64, UML} checks with a new option
As arm64 is about to introduce MTE-specific phdrs in the core dump, add a common CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS option currently selectable by UML_X86 and IA64. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Eric Biederman <ebiederm@xmission.com> Link: https://lore.kernel.org/r/20220131165456.2160675-2-catalin.marinas@arm.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'include/linux/elfcore.h')
-rw-r--r--include/linux/elfcore.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index 746e081879a5..f8e206e82476 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -114,7 +114,7 @@ static inline int elf_core_copy_task_fpregs(struct task_struct *t, struct pt_reg
#endif
}
-#if (defined(CONFIG_UML) && defined(CONFIG_X86_32)) || defined(CONFIG_IA64)
+#ifdef CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS
/*
* These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
* extra segments containing the gate DSO contents. Dumping its
@@ -149,6 +149,6 @@ static inline size_t elf_core_extra_data_size(void)
{
return 0;
}
-#endif
+#endif /* CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS */
#endif /* _LINUX_ELFCORE_H */