Commit 6d8c4e3b authored by David Howells's avatar David Howells Committed by Linus Torvalds

[PATCH] FDPIC: Add coredump capability for the ELF-FDPIC binfmt

Add coredump capability for the ELF-FDPIC binfmt.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b4cac1a0
......@@ -371,3 +371,11 @@ int elf_check_arch(const struct elf32_hdr *hdr)
return 1;
}
int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)
{
memcpy(fpregs,
&current->thread.user->f,
sizeof(current->thread.user->f));
return 1;
}
This diff is collapsed.
......@@ -64,7 +64,7 @@ typedef unsigned long elf_greg_t;
#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef struct fpmedia_struct elf_fpregset_t;
typedef struct user_fpmedia_regs elf_fpregset_t;
/*
* This is used to ensure we don't load something for the wrong architecture.
......@@ -116,6 +116,7 @@ do { \
} while(0)
#define USE_ELF_CORE_DUMP
#define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC
#define ELF_EXEC_PAGESIZE 16384
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
......@@ -125,9 +126,6 @@ do { \
#define ELF_ET_DYN_BASE 0x08000000UL
#define ELF_CORE_COPY_REGS(pr_reg, regs) \
memcpy(&pr_reg[0], &regs->sp, 31 * sizeof(uint32_t));
/* This yields a mask that user programs can use to figure out what
instruction set this cpu supports. */
......
......@@ -60,6 +60,16 @@ struct elf_prstatus
long pr_instr; /* Current instruction */
#endif
elf_gregset_t pr_reg; /* GP registers */
#ifdef CONFIG_BINFMT_ELF_FDPIC
/* When using FDPIC, the loadmap addresses need to be communicated
* to GDB in order for GDB to do the necessary relocations. The
* fields (below) used to communicate this information are placed
* immediately after ``pr_reg'', so that the loadmap addresses may
* be viewed as part of the register set if so desired.
*/
unsigned long pr_exec_fdpic_loadmap;
unsigned long pr_interp_fdpic_loadmap;
#endif
int pr_fpvalid; /* True if math co-processor being used. */
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment