1
2
3
4 #ifndef __ASM_CSKY_ELF_H
5 #define __ASM_CSKY_ELF_H
6
7 #include <asm/ptrace.h>
8 #include <abi/regdef.h>
9
10 #define ELF_ARCH EM_CSKY
11 #define EM_CSKY_OLD 39
12
13
14 #define R_CSKY_NONE 0
15 #define R_CSKY_32 1
16 #define R_CSKY_PCIMM8BY4 2
17 #define R_CSKY_PCIMM11BY2 3
18 #define R_CSKY_PCIMM4BY2 4
19 #define R_CSKY_PC32 5
20 #define R_CSKY_PCRELJSR_IMM11BY2 6
21 #define R_CSKY_GNU_VTINHERIT 7
22 #define R_CSKY_GNU_VTENTRY 8
23 #define R_CSKY_RELATIVE 9
24 #define R_CSKY_COPY 10
25 #define R_CSKY_GLOB_DAT 11
26 #define R_CSKY_JUMP_SLOT 12
27 #define R_CSKY_ADDR_HI16 24
28 #define R_CSKY_ADDR_LO16 25
29 #define R_CSKY_PCRELJSR_IMM26BY2 40
30
31 typedef unsigned long elf_greg_t;
32
33 typedef struct user_fp elf_fpregset_t;
34
35
36
37
38
39
40 #define ELF_NGREG ((sizeof(struct pt_regs) / sizeof(elf_greg_t)) - 2)
41
42 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
43
44
45
46
47 #define elf_check_arch(x) (((x)->e_machine == ELF_ARCH) || \
48 ((x)->e_machine == EM_CSKY_OLD))
49
50
51
52
53 #define USE_ELF_CORE_DUMP
54 #define ELF_EXEC_PAGESIZE 4096
55 #define ELF_CLASS ELFCLASS32
56 #define ELF_PLAT_INIT(_r, load_addr) { _r->a0 = 0; }
57
58 #ifdef __cskyBE__
59 #define ELF_DATA ELFDATA2MSB
60 #else
61 #define ELF_DATA ELFDATA2LSB
62 #endif
63
64
65
66
67
68
69
70 #define ELF_ET_DYN_BASE 0x0UL
71 #include <abi/elf.h>
72
73
74 struct task_struct;
75 extern int dump_task_regs(struct task_struct *tsk, elf_gregset_t *elf_regs);
76 #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs)
77
78 #define ELF_HWCAP (0)
79
80
81
82
83
84
85 #define ELF_PLATFORM (NULL)
86 #define SET_PERSONALITY(ex) set_personality(PER_LINUX)
87
88 #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
89 struct linux_binprm;
90 extern int arch_setup_additional_pages(struct linux_binprm *bprm,
91 int uses_interp);
92 #endif