diff options
author | Huang Ying <ying.huang@intel.com> | 2008-10-29 11:24:30 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-10-31 12:58:34 +1100 |
commit | 2b6a50a16a3de9716c8a34af43b8286e5b58b1f2 (patch) | |
tree | cd6e61e205d3835072d535a12040aef62b654791 | |
parent | ceb04ae1223ba5cdd40df744aa73a32b2cc7d879 (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>
-rw-r--r-- | kexec/kexec-elf-exec.c | 3 |
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"); |