X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Flinux%2Felfcore.h;h=394a3e0e4a6be1f566d5346dd586cf7fd06ba19d;hb=HEAD;hp=00d6a68d04215e7e289a3451ca4a8f714e2b6975;hpb=e9bf0cc7cbfbf3952cdf8028aa0d348d09ecdba1;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 00d6a68..394a3e0 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h @@ -8,6 +8,8 @@ #include #endif #include +#include +#include struct elf_siginfo { @@ -148,7 +150,22 @@ static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregse } #endif -#endif /* __KERNEL__ */ +/* + * These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out + * extra segments containing the gate DSO contents. Dumping its + * contents makes post-mortem fully interpretable later without matching up + * the same kernel and hardware config to see what PC values meant. + * Dumping its extra ELF program headers includes all the other information + * a debugger needs to easily find how the gate DSO was being used. + */ +extern Elf_Half elf_core_extra_phdrs(void); +extern int +elf_core_write_extra_phdrs(struct file *file, 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); +#endif /* __KERNEL__ */ #endif /* _LINUX_ELFCORE_H */