diff options
Diffstat (limited to 'arch/score/include/asm/elf.h')
-rw-r--r-- | arch/score/include/asm/elf.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/arch/score/include/asm/elf.h b/arch/score/include/asm/elf.h new file mode 100644 index 000000000000..832436375ac3 --- /dev/null +++ b/arch/score/include/asm/elf.h | |||
@@ -0,0 +1,99 @@ | |||
1 | #ifndef _ASM_SCORE_ELF_H | ||
2 | #define _ASM_SCORE_ELF_H | ||
3 | |||
4 | /* ELF register definitions */ | ||
5 | #define ELF_NGREG 45 | ||
6 | #define ELF_NFPREG 33 | ||
7 | #define EM_SCORE7 135 | ||
8 | |||
9 | /* Relocation types. */ | ||
10 | #define R_SCORE_NONE 0 | ||
11 | #define R_SCORE_HI16 1 | ||
12 | #define R_SCORE_LO16 2 | ||
13 | #define R_SCORE_BCMP 3 | ||
14 | #define R_SCORE_24 4 | ||
15 | #define R_SCORE_PC19 5 | ||
16 | #define R_SCORE16_11 6 | ||
17 | #define R_SCORE16_PC8 7 | ||
18 | #define R_SCORE_ABS32 8 | ||
19 | #define R_SCORE_ABS16 9 | ||
20 | #define R_SCORE_DUMMY2 10 | ||
21 | #define R_SCORE_GP15 11 | ||
22 | #define R_SCORE_GNU_VTINHERIT 12 | ||
23 | #define R_SCORE_GNU_VTENTRY 13 | ||
24 | #define R_SCORE_GOT15 14 | ||
25 | #define R_SCORE_GOT_LO16 15 | ||
26 | #define R_SCORE_CALL15 16 | ||
27 | #define R_SCORE_GPREL32 17 | ||
28 | #define R_SCORE_REL32 18 | ||
29 | #define R_SCORE_DUMMY_HI16 19 | ||
30 | #define R_SCORE_IMM30 20 | ||
31 | #define R_SCORE_IMM32 21 | ||
32 | |||
33 | typedef unsigned long elf_greg_t; | ||
34 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
35 | |||
36 | typedef double elf_fpreg_t; | ||
37 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | ||
38 | |||
39 | #define elf_check_arch(x) ((x)->e_machine == EM_SCORE7) | ||
40 | |||
41 | /* | ||
42 | * These are used to set parameters in the core dumps. | ||
43 | */ | ||
44 | #define ELF_CLASS ELFCLASS32 | ||
45 | |||
46 | /* | ||
47 | * These are used to set parameters in the core dumps. | ||
48 | */ | ||
49 | #define ELF_DATA ELFDATA2LSB | ||
50 | #define ELF_ARCH EM_SCORE7 | ||
51 | |||
52 | #define SET_PERSONALITY(ex) \ | ||
53 | do { \ | ||
54 | set_personality(PER_LINUX); \ | ||
55 | } while (0) | ||
56 | |||
57 | struct task_struct; | ||
58 | struct pt_regs; | ||
59 | |||
60 | #define USE_ELF_CORE_DUMP | ||
61 | #define ELF_EXEC_PAGESIZE PAGE_SIZE | ||
62 | |||
63 | /* This yields a mask that user programs can use to figure out what | ||
64 | instruction set this cpu supports. This could be done in userspace, | ||
65 | but it's not easy, and we've already done it here. */ | ||
66 | |||
67 | #define ELF_HWCAP (0) | ||
68 | |||
69 | /* This yields a string that ld.so will use to load implementation | ||
70 | specific libraries for optimization. This is more specific in | ||
71 | intent than poking at uname or /proc/cpuinfo. | ||
72 | |||
73 | For the moment, we have only optimizations for the Intel generations, | ||
74 | but that could change... */ | ||
75 | |||
76 | #define ELF_PLATFORM (NULL) | ||
77 | |||
78 | #define ELF_PLAT_INIT(_r, load_addr) \ | ||
79 | do { \ | ||
80 | _r->regs[1] = _r->regs[2] = _r->regs[3] = _r->regs[4] = 0; \ | ||
81 | _r->regs[5] = _r->regs[6] = _r->regs[7] = _r->regs[8] = 0; \ | ||
82 | _r->regs[9] = _r->regs[10] = _r->regs[11] = _r->regs[12] = 0; \ | ||
83 | _r->regs[13] = _r->regs[14] = _r->regs[15] = _r->regs[16] = 0; \ | ||
84 | _r->regs[17] = _r->regs[18] = _r->regs[19] = _r->regs[20] = 0; \ | ||
85 | _r->regs[21] = _r->regs[22] = _r->regs[23] = _r->regs[24] = 0; \ | ||
86 | _r->regs[25] = _r->regs[26] = _r->regs[27] = _r->regs[28] = 0; \ | ||
87 | _r->regs[30] = _r->regs[31] = 0; \ | ||
88 | } while (0) | ||
89 | |||
90 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | ||
91 | use of this is to invoke "./ld.so someprog" to test out a new version of | ||
92 | the loader. We need to make sure that it is out of the way of the program | ||
93 | that it will "exec", and that there is sufficient room for the brk. */ | ||
94 | |||
95 | #ifndef ELF_ET_DYN_BASE | ||
96 | #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) | ||
97 | #endif | ||
98 | |||
99 | #endif /* _ASM_SCORE_ELF_H */ | ||