arm64: elf: fix core dumping definitions for GP and FP registers
struct user_fp does not exist for arm64, so use struct user_fpsimd_state instead for the ELF core dumping definitions. Furthermore, since we use regset-based core dumping, we do not need definitions for dump_task_regs and dump_fpu. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
f46f979fda
commit
6ba1bc826d
|
@ -25,12 +25,10 @@
|
||||||
#include <asm/user.h>
|
#include <asm/user.h>
|
||||||
|
|
||||||
typedef unsigned long elf_greg_t;
|
typedef unsigned long elf_greg_t;
|
||||||
typedef unsigned long elf_freg_t[3];
|
|
||||||
|
|
||||||
#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
|
#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
|
||||||
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
|
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
|
||||||
|
typedef struct user_fpsimd_state elf_fpregset_t;
|
||||||
typedef struct user_fp elf_fpregset_t;
|
|
||||||
|
|
||||||
#define EM_AARCH64 183
|
#define EM_AARCH64 183
|
||||||
|
|
||||||
|
@ -87,7 +85,6 @@ typedef struct user_fp elf_fpregset_t;
|
||||||
#define R_AARCH64_MOVW_PREL_G2_NC 292
|
#define R_AARCH64_MOVW_PREL_G2_NC 292
|
||||||
#define R_AARCH64_MOVW_PREL_G3 293
|
#define R_AARCH64_MOVW_PREL_G3 293
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are used to set parameters in the core dumps.
|
* These are used to set parameters in the core dumps.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,9 +25,8 @@
|
||||||
* - FPSR and FPCR
|
* - FPSR and FPCR
|
||||||
* - 32 128-bit data registers
|
* - 32 128-bit data registers
|
||||||
*
|
*
|
||||||
* Note that user_fp forms a prefix of this structure, which is relied
|
* Note that user_fpsimd forms a prefix of this structure, which is
|
||||||
* upon in the ptrace FP/SIMD accessors. struct user_fpsimd_state must
|
* relied upon in the ptrace FP/SIMD accessors.
|
||||||
* form a prefix of struct fpsimd_state.
|
|
||||||
*/
|
*/
|
||||||
struct fpsimd_state {
|
struct fpsimd_state {
|
||||||
union {
|
union {
|
||||||
|
|
|
@ -309,24 +309,6 @@ struct task_struct *__switch_to(struct task_struct *prev,
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Fill in the task's elfregs structure for a core dump.
|
|
||||||
*/
|
|
||||||
int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs)
|
|
||||||
{
|
|
||||||
elf_core_copy_regs(elfregs, task_pt_regs(t));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* fill in the fpe structure for a core dump...
|
|
||||||
*/
|
|
||||||
int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(dump_fpu);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Shuffle the argument into the correct register before calling the
|
* Shuffle the argument into the correct register before calling the
|
||||||
* thread function. x1 is the thread argument, x2 is the pointer to
|
* thread function. x1 is the thread argument, x2 is the pointer to
|
||||||
|
|
Loading…
Reference in New Issue