aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/binfmt_elf32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/binfmt_elf32.c')
-rw-r--r--arch/sparc64/kernel/binfmt_elf32.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c
index 1587a29a4b0e..d141300e76b7 100644
--- a/arch/sparc64/kernel/binfmt_elf32.c
+++ b/arch/sparc64/kernel/binfmt_elf32.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * binfmt_elf32.c: Support 32-bit Sparc ELF binaries on Ultra. 2 * binfmt_elf32.c: Support 32-bit Sparc ELF binaries on Ultra.
3 * 3 *
4 * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@davemloft.net) 4 * Copyright (C) 1995, 1996, 1997, 1998, 2008 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz) 5 * Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz)
6 */ 6 */
7 7
@@ -9,13 +9,6 @@
9#define ELF_CLASS ELFCLASS32 9#define ELF_CLASS ELFCLASS32
10#define ELF_DATA ELFDATA2MSB; 10#define ELF_DATA ELFDATA2MSB;
11 11
12/* For the most part we present code dumps in the format
13 * Solaris does.
14 */
15typedef unsigned int elf_greg_t;
16#define ELF_NGREG 38
17typedef elf_greg_t elf_gregset_t[ELF_NGREG];
18
19/* Format is: 12/* Format is:
20 * G0 --> G7 13 * G0 --> G7
21 * O0 --> O7 14 * O0 --> O7
@@ -23,25 +16,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
23 * I0 --> I7 16 * I0 --> I7
24 * PSR, PC, nPC, Y, WIM, TBR 17 * PSR, PC, nPC, Y, WIM, TBR
25 */ 18 */
26#include <asm/psrcompat.h> 19typedef unsigned int elf_greg_t;
27#define ELF_CORE_COPY_REGS(__elf_regs, __pt_regs) \ 20#define ELF_NGREG 38
28do { unsigned int *dest = &(__elf_regs[0]); \ 21typedef elf_greg_t elf_gregset_t[ELF_NGREG];
29 struct pt_regs *src = (__pt_regs); \
30 unsigned int __user *sp; \
31 int i; \
32 for(i = 0; i < 16; i++) \
33 dest[i] = (unsigned int) src->u_regs[i];\
34 /* Don't try this at home kids... */ \
35 sp = (unsigned int __user *) (src->u_regs[14] & \
36 0x00000000fffffffc); \
37 for(i = 0; i < 16; i++) \
38 __get_user(dest[i+16], &sp[i]); \
39 dest[32] = tstate_to_psr(src->tstate); \
40 dest[33] = (unsigned int) src->tpc; \
41 dest[34] = (unsigned int) src->tnpc; \
42 dest[35] = src->y; \
43 dest[36] = dest[37] = 0; /* XXX */ \
44} while(0);
45 22
46typedef struct { 23typedef struct {
47 union { 24 union {