[PATCH 06/19] Define API for reading arch specif Program Headersfor Core
From: Janani Venkataraman
Date: Fri Oct 04 2013 - 06:31:44 EST
From:Suzuki K. Poulose <suzuki@xxxxxxxxxx>
The binfmt ELF defines APIs for the "arch" specific Program headers to be
written to the ELF core. Define the "read" (or copy) variants of the APIs, to
collect it for the application core dump(which is a read based approach).
Signed-off-by: Suzuki K. Poulose <suzuki@xxxxxxxxxx>
---
include/linux/elfcore.h | 3 +++
kernel/elfcore.c | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index cdd3d13..cf13b45 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -66,6 +66,9 @@ extern int
elf_core_write_extra_phdrs(struct file *file, loff_t offset, size_t *size,
unsigned long limit);
extern int
+elf_core_copy_extra_phdrs(char *buf, loff_t offset, size_t *size,
+ unsigned long limit);
+extern int
elf_core_write_extra_data(struct file *file, size_t *size, unsigned long limit);
extern size_t elf_core_extra_data_size(void);
diff --git a/kernel/elfcore.c b/kernel/elfcore.c
index ff915ef..f422c6c 100644
--- a/kernel/elfcore.c
+++ b/kernel/elfcore.c
@@ -16,6 +16,12 @@ int __weak elf_core_write_extra_phdrs(struct file *file, loff_t offset, size_t *
return 1;
}
+int __weak elf_core_copy_extra_phdrs(char *buf, loff_t offset, size_t *size,
+ unsigned long limit)
+{
+ return 1;
+}
+
int __weak elf_core_write_extra_data(struct file *file, size_t *size,
unsigned long limit)
{
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/