Skip to contentSkip to conversation

core dump file support for ELF loader

PATCH In review Huang Ying 1 participant 1 message Oct 29, 2008

Subsystems (2)
lore
Share & tools
lore

Huang Ying

author
#0 lore raw

PATCH 2/2 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.

---
 kexec/kexec-elf-exec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kexec/kexec-elf-exec.c +2 -1
@@ -20,7 +20,8 @@ int build_elf_exec_info(const char *buf,
 	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");

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec