summaryrefslogtreecommitdiff
path: root/kexec/kexec-elf-exec.c
diff options
context:
space:
mode:
authorHuang Ying <ying.huang@intel.com>2008-10-29 11:24:30 +0800
committerSimon Horman <horms@verge.net.au>2008-10-31 12:58:34 +1100
commit2b6a50a16a3de9716c8a34af43b8286e5b58b1f2 (patch)
treecd6e61e205d3835072d535a12040aef62b654791 /kexec/kexec-elf-exec.c
parentceb04ae1223ba5cdd40df744aa73a32b2cc7d879 (diff)
core dump file support for ELF loader
This patch adds core dump file support to ELF file loader. This can be used by kexec based hibernation to load hibernated image, which is from /proc/vmcore, a core dump file. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec-elf-exec.c')
-rw-r--r--kexec/kexec-elf-exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kexec/kexec-elf-exec.c b/kexec/kexec-elf-exec.c
index 27844c3..5c89ddb 100644
--- a/kexec/kexec-elf-exec.c
+++ b/kexec/kexec-elf-exec.c
@@ -20,7 +20,8 @@ int build_elf_exec_info(const char *buf, off_t len, struct mem_ehdr *ehdr,
if (result < 0) {
return result;
}
- if ((ehdr->e_type != ET_EXEC) && (ehdr->e_type != ET_DYN)) {
+ if ((ehdr->e_type != ET_EXEC) && (ehdr->e_type != ET_DYN) &&
+ (ehdr->e_type != ET_CORE)) {
/* not an ELF executable */
if (probe_debug) {
fprintf(stderr, "Not ELF type ET_EXEC or ET_DYN\n");