aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64/elf.h')
-rw-r--r--include/asm-sparc64/elf.h30
1 files changed, 5 insertions, 25 deletions
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h
index dc7bc63e507e..272a65873f2e 100644
--- a/include/asm-sparc64/elf.h
+++ b/include/asm-sparc64/elf.h
@@ -70,6 +70,8 @@
70#define HWCAP_SPARC_BLKINIT 64 70#define HWCAP_SPARC_BLKINIT 64
71#define HWCAP_SPARC_N2 128 71#define HWCAP_SPARC_N2 128
72 72
73#define CORE_DUMP_USE_REGSET
74
73/* 75/*
74 * These are used to set parameters in the core dumps. 76 * These are used to set parameters in the core dumps.
75 */ 77 */
@@ -78,10 +80,6 @@
78#define ELF_CLASS ELFCLASS64 80#define ELF_CLASS ELFCLASS64
79#define ELF_DATA ELFDATA2MSB 81#define ELF_DATA ELFDATA2MSB
80 82
81typedef unsigned long elf_greg_t;
82
83#define ELF_NGREG 36
84typedef elf_greg_t elf_gregset_t[ELF_NGREG];
85/* Format of 64-bit elf_gregset_t is: 83/* Format of 64-bit elf_gregset_t is:
86 * G0 --> G7 84 * G0 --> G7
87 * O0 --> O7 85 * O0 --> O7
@@ -92,24 +90,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
92 * TNPC 90 * TNPC
93 * Y 91 * Y
94 */ 92 */
95#define ELF_CORE_COPY_REGS(__elf_regs, __pt_regs) \ 93typedef unsigned long elf_greg_t;
96do { unsigned long *dest = &(__elf_regs[0]); \ 94#define ELF_NGREG 36
97 struct pt_regs *src = (__pt_regs); \ 95typedef elf_greg_t elf_gregset_t[ELF_NGREG];
98 unsigned long __user *sp; \
99 int i; \
100 for(i = 0; i < 16; i++) \
101 dest[i] = src->u_regs[i]; \
102 /* Don't try this at home kids... */ \
103 sp = (unsigned long __user *) \
104 ((src->u_regs[14] + STACK_BIAS) \
105 & 0xfffffffffffffff8UL); \
106 for(i = 0; i < 16; i++) \
107 __get_user(dest[i+16], &sp[i]); \
108 dest[32] = src->tstate; \
109 dest[33] = src->tpc; \
110 dest[34] = src->tnpc; \
111 dest[35] = src->y; \
112} while (0);
113 96
114typedef struct { 97typedef struct {
115 unsigned long pr_regs[32]; 98 unsigned long pr_regs[32];
@@ -119,9 +102,6 @@ typedef struct {
119} elf_fpregset_t; 102} elf_fpregset_t;
120#endif 103#endif
121 104
122#define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \
123 ({ ELF_CORE_COPY_REGS((*(__elf_regs)), task_pt_regs(__tsk)); 1; })
124
125/* 105/*
126 * This is used to ensure we don't load something for the wrong architecture. 106 * This is used to ensure we don't load something for the wrong architecture.
127 */ 107 */