diff options
Diffstat (limited to 'include/asm-sparc')
-rw-r--r-- | include/asm-sparc/elf.h | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/include/asm-sparc/elf.h b/include/asm-sparc/elf.h index 83a3dd15a6ed..aaf6ef40ee2f 100644 --- a/include/asm-sparc/elf.h +++ b/include/asm-sparc/elf.h | |||
@@ -8,11 +8,6 @@ | |||
8 | 8 | ||
9 | #include <asm/ptrace.h> | 9 | #include <asm/ptrace.h> |
10 | 10 | ||
11 | #ifdef __KERNEL__ | ||
12 | #include <asm/mbus.h> | ||
13 | #include <asm/uaccess.h> | ||
14 | #endif | ||
15 | |||
16 | /* | 11 | /* |
17 | * Sparc section types | 12 | * Sparc section types |
18 | */ | 13 | */ |
@@ -77,6 +72,23 @@ typedef unsigned long elf_greg_t; | |||
77 | #define ELF_NGREG 38 | 72 | #define ELF_NGREG 38 |
78 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | 73 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
79 | 74 | ||
75 | typedef struct { | ||
76 | union { | ||
77 | unsigned long pr_regs[32]; | ||
78 | double pr_dregs[16]; | ||
79 | } pr_fr; | ||
80 | unsigned long __unused; | ||
81 | unsigned long pr_fsr; | ||
82 | unsigned char pr_qcnt; | ||
83 | unsigned char pr_q_entrysize; | ||
84 | unsigned char pr_en; | ||
85 | unsigned int pr_q[64]; | ||
86 | } elf_fpregset_t; | ||
87 | |||
88 | #ifdef __KERNEL__ | ||
89 | #include <asm/mbus.h> | ||
90 | #include <asm/uaccess.h> | ||
91 | |||
80 | /* Format is: | 92 | /* Format is: |
81 | * G0 --> G7 | 93 | * G0 --> G7 |
82 | * O0 --> O7 | 94 | * O0 --> O7 |
@@ -99,20 +111,7 @@ do { unsigned long *dest = &(__elf_regs[0]); \ | |||
99 | dest[34] = src->npc; \ | 111 | dest[34] = src->npc; \ |
100 | dest[35] = src->y; \ | 112 | dest[35] = src->y; \ |
101 | dest[36] = dest[37] = 0; /* XXX */ \ | 113 | dest[36] = dest[37] = 0; /* XXX */ \ |
102 | } while(0); /* Janitors: Don't touch this colon. */ | 114 | } while(0); /* Janitors: Don't touch this semicolon. */ |
103 | |||
104 | typedef struct { | ||
105 | union { | ||
106 | unsigned long pr_regs[32]; | ||
107 | double pr_dregs[16]; | ||
108 | } pr_fr; | ||
109 | unsigned long __unused; | ||
110 | unsigned long pr_fsr; | ||
111 | unsigned char pr_qcnt; | ||
112 | unsigned char pr_q_entrysize; | ||
113 | unsigned char pr_en; | ||
114 | unsigned int pr_q[64]; | ||
115 | } elf_fpregset_t; | ||
116 | 115 | ||
117 | #define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \ | 116 | #define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \ |
118 | ({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread.kregs); 1; }) | 117 | ({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread.kregs); 1; }) |
@@ -165,8 +164,8 @@ typedef struct { | |||
165 | 164 | ||
166 | #define ELF_PLATFORM (NULL) | 165 | #define ELF_PLATFORM (NULL) |
167 | 166 | ||
168 | #ifdef __KERNEL__ | ||
169 | #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) | 167 | #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) |
170 | #endif | 168 | |
169 | #endif /* __KERNEL__ */ | ||
171 | 170 | ||
172 | #endif /* !(__ASMSPARC_ELF_H) */ | 171 | #endif /* !(__ASMSPARC_ELF_H) */ |