0001
0002 #ifndef __ASMSPARC_ELF_H
0003 #define __ASMSPARC_ELF_H
0004
0005
0006
0007
0008
0009 #include <asm/ptrace.h>
0010
0011
0012
0013
0014 #define STT_REGISTER 13
0015
0016
0017
0018
0019 #define R_SPARC_NONE 0
0020 #define R_SPARC_8 1
0021 #define R_SPARC_16 2
0022 #define R_SPARC_32 3
0023 #define R_SPARC_DISP8 4
0024 #define R_SPARC_DISP16 5
0025 #define R_SPARC_DISP32 6
0026 #define R_SPARC_WDISP30 7
0027 #define R_SPARC_WDISP22 8
0028 #define R_SPARC_HI22 9
0029 #define R_SPARC_22 10
0030 #define R_SPARC_13 11
0031 #define R_SPARC_LO10 12
0032 #define R_SPARC_GOT10 13
0033 #define R_SPARC_GOT13 14
0034 #define R_SPARC_GOT22 15
0035 #define R_SPARC_PC10 16
0036 #define R_SPARC_PC22 17
0037 #define R_SPARC_WPLT30 18
0038 #define R_SPARC_COPY 19
0039 #define R_SPARC_GLOB_DAT 20
0040 #define R_SPARC_JMP_SLOT 21
0041 #define R_SPARC_RELATIVE 22
0042 #define R_SPARC_UA32 23
0043 #define R_SPARC_PLT32 24
0044 #define R_SPARC_HIPLT22 25
0045 #define R_SPARC_LOPLT10 26
0046 #define R_SPARC_PCPLT32 27
0047 #define R_SPARC_PCPLT22 28
0048 #define R_SPARC_PCPLT10 29
0049 #define R_SPARC_10 30
0050 #define R_SPARC_11 31
0051 #define R_SPARC_64 32
0052 #define R_SPARC_OLO10 33
0053 #define R_SPARC_WDISP16 40
0054 #define R_SPARC_WDISP19 41
0055 #define R_SPARC_7 43
0056 #define R_SPARC_5 44
0057 #define R_SPARC_6 45
0058
0059
0060
0061 #define HWCAP_SPARC_FLUSH 1
0062 #define HWCAP_SPARC_STBAR 2
0063 #define HWCAP_SPARC_SWAP 4
0064 #define HWCAP_SPARC_MULDIV 8
0065 #define HWCAP_SPARC_V9 16
0066 #define HWCAP_SPARC_ULTRA3 32
0067
0068 #define CORE_DUMP_USE_REGSET
0069
0070
0071
0072
0073
0074
0075
0076
0077 typedef unsigned long elf_greg_t;
0078 #define ELF_NGREG 38
0079 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
0080
0081 typedef struct {
0082 union {
0083 unsigned long pr_regs[32];
0084 double pr_dregs[16];
0085 } pr_fr;
0086 unsigned long __unused;
0087 unsigned long pr_fsr;
0088 unsigned char pr_qcnt;
0089 unsigned char pr_q_entrysize;
0090 unsigned char pr_en;
0091 unsigned int pr_q[64];
0092 } elf_fpregset_t;
0093
0094 #include <asm/mbus.h>
0095
0096
0097
0098
0099 #define elf_check_arch(x) ((x)->e_machine == EM_SPARC)
0100
0101
0102
0103
0104 #define ELF_ARCH EM_SPARC
0105 #define ELF_CLASS ELFCLASS32
0106 #define ELF_DATA ELFDATA2MSB
0107
0108 #define ELF_EXEC_PAGESIZE 4096
0109
0110
0111
0112
0113
0114
0115
0116 #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE)
0117
0118
0119
0120
0121
0122
0123 #define ELF_HWCAP (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | \
0124 HWCAP_SPARC_SWAP | HWCAP_SPARC_MULDIV)
0125
0126
0127
0128
0129
0130 #define ELF_PLATFORM (NULL)
0131
0132 #endif