summaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/elf.h')
-rw-r--r--include/asm-powerpc/elf.h37
1 files changed, 10 insertions, 27 deletions
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h
index 9080d85cb9d0..89664675b469 100644
--- a/include/asm-powerpc/elf.h
+++ b/include/asm-powerpc/elf.h
@@ -109,6 +109,7 @@ typedef elf_gregset_t32 compat_elf_gregset_t;
#ifdef __powerpc64__
# define ELF_NVRREG32 33 /* includes vscr & vrsave stuffed together */
# define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */
+# define ELF_NVSRHALFREG 32 /* Half the vsx registers */
# define ELF_GREG_TYPE elf_greg_t64
#else
# define ELF_NEVRREG 34 /* includes acc (as 2) */
@@ -158,6 +159,7 @@ typedef __vector128 elf_vrreg_t;
typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
#ifdef __powerpc64__
typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32];
+typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
#endif
#ifdef __KERNEL__
@@ -202,30 +204,8 @@ static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs,
}
#define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs);
-static inline int dump_task_regs(struct task_struct *tsk,
- elf_gregset_t *elf_regs)
-{
- struct pt_regs *regs = tsk->thread.regs;
- if (regs)
- ppc_elf_core_copy_regs(*elf_regs, regs);
-
- return 1;
-}
-#define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs)
-
-extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
-#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
-
typedef elf_vrregset_t elf_fpxregset_t;
-#ifdef CONFIG_ALTIVEC
-extern int dump_task_altivec(struct task_struct *, elf_vrregset_t *vrregs);
-#define ELF_CORE_COPY_XFPREGS(tsk, regs) dump_task_altivec(tsk, regs)
-#define ELF_CORE_XFPREG_TYPE NT_PPC_VMX
-#endif
-
-#endif /* __KERNEL__ */
-
/* ELF_HWCAP yields a mask that user programs can use to figure out what
instruction set this cpu supports. This could be done in userspace,
but it's not easy, and we've already done it here. */
@@ -243,8 +223,6 @@ extern int dump_task_altivec(struct task_struct *, elf_vrregset_t *vrregs);
} while (0)
#endif /* __powerpc64__ */
-#ifdef __KERNEL__
-
#ifdef __powerpc64__
# define SET_PERSONALITY(ex, ibcs2) \
do { \
@@ -257,7 +235,8 @@ do { \
else \
clear_thread_flag(TIF_ABI_PENDING); \
if (personality(current->personality) != PER_LINUX32) \
- set_personality(PER_LINUX); \
+ set_personality(PER_LINUX | \
+ (current->personality & (~PER_MASK))); \
} while (0)
/*
* An executable for which elf_read_implies_exec() returns TRUE will
@@ -272,8 +251,6 @@ do { \
# define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
#endif /* __powerpc64__ */
-#endif /* __KERNEL__ */
-
extern int dcache_bsize;
extern int icache_bsize;
extern int ucache_bsize;
@@ -285,6 +262,8 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
int executable_stack);
#define VDSO_AUX_ENT(a,b) NEW_AUX_ENT(a,b);
+#endif /* __KERNEL__ */
+
/*
* The requirements here are:
* - keep the final alignment of sp (sp & 0xf)
@@ -422,6 +401,8 @@ do { \
/* Keep this the last entry. */
#define R_PPC64_NUM 107
+#ifdef __KERNEL__
+
#ifdef CONFIG_SPU_BASE
/* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */
#define NT_SPU 1
@@ -430,4 +411,6 @@ do { \
#endif /* CONFIG_SPU_BASE */
+#endif /* __KERNEL */
+
#endif /* _ASM_POWERPC_ELF_H */