~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/elfcore.h

Version: ~ [ linux-5.6 ] ~ [ linux-5.5.13 ] ~ [ linux-5.4.28 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.113 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.174 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.217 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.217 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.82 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _LINUX_ELFCORE_H
  2 #define _LINUX_ELFCORE_H
  3 
  4 #include <linux/user.h>
  5 #include <linux/bug.h>
  6 #include <asm/elf.h>
  7 #include <uapi/linux/elfcore.h>
  8 
  9 static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *regs)
 10 {
 11 #ifdef ELF_CORE_COPY_REGS
 12         ELF_CORE_COPY_REGS((*elfregs), regs)
 13 #else
 14         BUG_ON(sizeof(*elfregs) != sizeof(*regs));
 15         *(struct pt_regs *)elfregs = *regs;
 16 #endif
 17 }
 18 
 19 static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_regs *regs)
 20 {
 21 #ifdef ELF_CORE_COPY_KERNEL_REGS
 22         ELF_CORE_COPY_KERNEL_REGS((*elfregs), regs);
 23 #else
 24         elf_core_copy_regs(elfregs, regs);
 25 #endif
 26 }
 27 
 28 static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs)
 29 {
 30 #if defined (ELF_CORE_COPY_TASK_REGS)
 31         return ELF_CORE_COPY_TASK_REGS(t, elfregs);
 32 #elif defined (task_pt_regs)
 33         elf_core_copy_regs(elfregs, task_pt_regs(t));
 34 #endif
 35         return 0;
 36 }
 37 
 38 extern int dump_fpu (struct pt_regs *, elf_fpregset_t *);
 39 
 40 static inline int elf_core_copy_task_fpregs(struct task_struct *t, struct pt_regs *regs, elf_fpregset_t *fpu)
 41 {
 42 #ifdef ELF_CORE_COPY_FPREGS
 43         return ELF_CORE_COPY_FPREGS(t, fpu);
 44 #else
 45         return dump_fpu(regs, fpu);
 46 #endif
 47 }
 48 
 49 #ifdef ELF_CORE_COPY_XFPREGS
 50 static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu)
 51 {
 52         return ELF_CORE_COPY_XFPREGS(t, xfpu);
 53 }
 54 #endif
 55 
 56 /*
 57  * These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
 58  * extra segments containing the gate DSO contents.  Dumping its
 59  * contents makes post-mortem fully interpretable later without matching up
 60  * the same kernel and hardware config to see what PC values meant.
 61  * Dumping its extra ELF program headers includes all the other information
 62  * a debugger needs to easily find how the gate DSO was being used.
 63  */
 64 extern Elf_Half elf_core_extra_phdrs(void);
 65 extern int
 66 elf_core_write_extra_phdrs(struct file *file, loff_t offset, size_t *size,
 67                            unsigned long limit);
 68 extern int
 69 elf_core_write_extra_data(struct file *file, size_t *size, unsigned long limit);
 70 extern size_t elf_core_extra_data_size(void);
 71 
 72 #endif /* _LINUX_ELFCORE_H */
 73 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp