phdr.p_flags |= PF_X;
phdr.p_align = ELF_EXEC_PAGESIZE;
- if (!dump_emit(cprm, &phdr, sizeof(phdr)))
+ if (!dump_emit(cprm, &phdr, sizeof(phdr))) {
+ coredump_report_failure("Error emitting program headers");
goto end_coredump;
+ }
}
- if (!elf_core_write_extra_phdrs(cprm, offset))
+ if (!elf_core_write_extra_phdrs(cprm, offset)) {
+ coredump_report_failure("Error writing out extra program headers");
goto end_coredump;
+ }
/* write out the notes section */
- if (!write_note_info(&info, cprm))
+ if (!write_note_info(&info, cprm)) {
+ coredump_report_failure("Error writing out notes");
goto end_coredump;
+ }
- /* For cell spufs */
+ /* For cell spufs and x86 xstate */
- if (elf_coredump_extra_notes_write(cprm))
+ if (elf_coredump_extra_notes_write(cprm)) {
+ coredump_report_failure("Error writing out extra notes");
goto end_coredump;
+ }
/* Align to page */
dump_skip_to(cprm, dataoff);