1
2
3
4
5
6
7
8
9
10
11
12 #ifndef _UAPI_ASM_MICROBLAZE_ELF_H
13 #define _UAPI_ASM_MICROBLAZE_ELF_H
14
15 #include <linux/elf-em.h>
16
17
18
19
20
21
22 #define EM_MICROBLAZE_OLD 0xbaab
23 #define ELF_ARCH EM_MICROBLAZE
24
25
26
27
28 #define elf_check_arch(x) ((x)->e_machine == EM_MICROBLAZE \
29 || (x)->e_machine == EM_MICROBLAZE_OLD)
30
31
32
33
34 #define ELF_CLASS ELFCLASS32
35
36 #ifndef __uClinux__
37
38
39
40
41
42 #include <asm/ptrace.h>
43 #include <asm/byteorder.h>
44
45 #ifndef ELF_GREG_T
46 #define ELF_GREG_T
47 typedef unsigned long elf_greg_t;
48 #endif
49
50 #ifndef ELF_NGREG
51 #define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))
52 #endif
53
54 #ifndef ELF_GREGSET_T
55 #define ELF_GREGSET_T
56 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
57 #endif
58
59 #ifndef ELF_FPREGSET_T
60 #define ELF_FPREGSET_T
61
62
63 #define ELF_NFPREG 33
64 typedef unsigned long elf_fpreg_t;
65 typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
66
67
68 #endif
69
70
71
72
73
74
75
76 #define ELF_ET_DYN_BASE (0x08000000)
77
78 #ifdef __MICROBLAZEEL__
79 #define ELF_DATA ELFDATA2LSB
80 #else
81 #define ELF_DATA ELFDATA2MSB
82 #endif
83
84 #define ELF_EXEC_PAGESIZE PAGE_SIZE
85
86
87 #define ELF_CORE_COPY_REGS(_dest, _regs) \
88 memcpy((char *) &_dest, (char *) _regs, \
89 sizeof(struct pt_regs));
90
91
92
93
94
95 #define ELF_HWCAP (0)
96
97
98
99
100
101
102
103
104 #define ELF_PLATFORM (NULL)
105
106
107 #define ELF_PLAT_INIT(_r, _f) \
108 do { \
109 _r->r0 = _r->r1 = _r->r2 = _r->r3 = \
110 _r->r4 = _r->r5 = _r->r6 = _r->r7 = \
111 _r->r8 = _r->r9 = _r->r10 = _r->r11 = \
112 _r->r12 = _r->r13 = _r->r14 = _r->r15 = \
113 _r->r16 = _r->r17 = _r->r18 = _r->r19 = \
114 _r->r20 = _r->r21 = _r->r22 = _r->r23 = \
115 _r->r24 = _r->r25 = _r->r26 = _r->r27 = \
116 _r->r28 = _r->r29 = _r->r30 = _r->r31 = \
117 0; \
118 } while (0)
119
120
121 #endif
122
123 #endif