aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-02-08 03:08:10 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-08 03:08:10 -0500
commit48c946a482661d8466cd24bae5df749147ff1b1d (patch)
tree5a393ae83101fab3ef69b448effbfcc5406a48ea /include/asm-sparc64
parent2ba85f3a58441dda35c62f0bc24e0dc3de432a88 (diff)
[SPARC64]: Make use of the new fs/compat_binfmt_elf.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/elf.h59
1 files changed, 51 insertions, 8 deletions
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h
index 272a65873f2e..11c8e68d712a 100644
--- a/include/asm-sparc64/elf.h
+++ b/include/asm-sparc64/elf.h
@@ -75,7 +75,6 @@
75/* 75/*
76 * These are used to set parameters in the core dumps. 76 * These are used to set parameters in the core dumps.
77 */ 77 */
78#ifndef ELF_ARCH
79#define ELF_ARCH EM_SPARCV9 78#define ELF_ARCH EM_SPARCV9
80#define ELF_CLASS ELFCLASS64 79#define ELF_CLASS ELFCLASS64
81#define ELF_DATA ELFDATA2MSB 80#define ELF_DATA ELFDATA2MSB
@@ -100,14 +99,59 @@ typedef struct {
100 unsigned long pr_gsr; 99 unsigned long pr_gsr;
101 unsigned long pr_fprs; 100 unsigned long pr_fprs;
102} elf_fpregset_t; 101} elf_fpregset_t;
103#endif 102
103/* Format of 32-bit elf_gregset_t is:
104 * G0 --> G7
105 * O0 --> O7
106 * L0 --> L7
107 * I0 --> I7
108 * PSR, PC, nPC, Y, WIM, TBR
109 */
110typedef unsigned int compat_elf_greg_t;
111#define COMPAT_ELF_NGREG 38
112typedef compat_elf_greg_t compat_elf_gregset_t[COMPAT_ELF_NGREG];
113
114typedef struct {
115 union {
116 unsigned int pr_regs[32];
117 unsigned long pr_dregs[16];
118 } pr_fr;
119 unsigned int __unused;
120 unsigned int pr_fsr;
121 unsigned char pr_qcnt;
122 unsigned char pr_q_entrysize;
123 unsigned char pr_en;
124 unsigned int pr_q[64];
125} compat_elf_fpregset_t;
126
127/* UltraSparc extensions. Still unused, but will be eventually. */
128typedef struct {
129 unsigned int pr_type;
130 unsigned int pr_align;
131 union {
132 struct {
133 union {
134 unsigned int pr_regs[32];
135 unsigned long pr_dregs[16];
136 long double pr_qregs[8];
137 } pr_xfr;
138 } pr_v8p;
139 unsigned int pr_xfsr;
140 unsigned int pr_fprs;
141 unsigned int pr_xg[8];
142 unsigned int pr_xo[8];
143 unsigned long pr_tstate;
144 unsigned int pr_filler[8];
145 } pr_un;
146} elf_xregset_t;
104 147
105/* 148/*
106 * This is used to ensure we don't load something for the wrong architecture. 149 * This is used to ensure we don't load something for the wrong architecture.
107 */ 150 */
108#ifndef elf_check_arch 151#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
109#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH) /* Might be EM_SPARCV9 or EM_SPARC */ 152#define compat_elf_check_arch(x) ((x)->e_machine == EM_SPARC || \
110#endif 153 (x)->e_machine == EM_SPARC32PLUS)
154#define compat_start_thread start_thread32
111 155
112#define USE_ELF_CORE_DUMP 156#define USE_ELF_CORE_DUMP
113#define ELF_EXEC_PAGESIZE PAGE_SIZE 157#define ELF_EXEC_PAGESIZE PAGE_SIZE
@@ -117,9 +161,8 @@ typedef struct {
117 the loader. We need to make sure that it is out of the way of the program 161 the loader. We need to make sure that it is out of the way of the program
118 that it will "exec", and that there is sufficient room for the brk. */ 162 that it will "exec", and that there is sufficient room for the brk. */
119 163
120#ifndef ELF_ET_DYN_BASE 164#define ELF_ET_DYN_BASE 0x0000010000000000UL
121#define ELF_ET_DYN_BASE 0x0000010000000000UL 165#define COMPAT_ELF_ET_DYN_BASE 0x0000000070000000UL
122#endif
123 166
124 167
125/* This yields a mask that user programs can use to figure out what 168/* This yields a mask that user programs can use to figure out what