Go to the documentation of this file.
19 #define R_386_GLOB_DAT 6
20 #define R_386_JMP_SLOT 7
21 #define R_386_RELATIVE 8
22 #define R_386_GOTOFF 9
23 #define R_386_GOTPC 10
29 #define elf_check_arch(x) \
30 (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486))
32 #define ELF_CLASS ELFCLASS32
33 #define ELF_DATA ELFDATA2LSB
34 #define ELF_ARCH EM_386
36 #define ELF_PLAT_INIT(regs, load_addr) do { \
37 PT_REGS_BX(regs) = 0; \
38 PT_REGS_CX(regs) = 0; \
39 PT_REGS_DX(regs) = 0; \
40 PT_REGS_SI(regs) = 0; \
41 PT_REGS_DI(regs) = 0; \
42 PT_REGS_BP(regs) = 0; \
43 PT_REGS_AX(regs) = 0; \
48 #define ELF_CORE_COPY_REGS(pr_reg, regs) do { \
49 pr_reg[0] = PT_REGS_BX(regs); \
50 pr_reg[1] = PT_REGS_CX(regs); \
51 pr_reg[2] = PT_REGS_DX(regs); \
52 pr_reg[3] = PT_REGS_SI(regs); \
53 pr_reg[4] = PT_REGS_DI(regs); \
54 pr_reg[5] = PT_REGS_BP(regs); \
55 pr_reg[6] = PT_REGS_AX(regs); \
56 pr_reg[7] = PT_REGS_DS(regs); \
57 pr_reg[8] = PT_REGS_ES(regs); \
59 pr_reg[9] = PT_REGS_DS(regs); \
60 pr_reg[10] = PT_REGS_DS(regs); \
61 pr_reg[11] = PT_REGS_SYSCALL_NR(regs); \
62 pr_reg[12] = PT_REGS_IP(regs); \
63 pr_reg[13] = PT_REGS_CS(regs); \
64 pr_reg[14] = PT_REGS_EFLAGS(regs); \
65 pr_reg[15] = PT_REGS_SP(regs); \
66 pr_reg[16] = PT_REGS_SS(regs); \
70 #define ELF_PLATFORM (elf_aux_platform)
80 #define FIXADDR_USER_START vsyscall_ehdr
81 #define FIXADDR_USER_END vsyscall_end
89 #define AT_SYSINFO_EHDR 33
93 if ( vsyscall_ehdr ) { \
94 NEW_AUX_ENT(AT_SYSINFO, __kernel_vsyscall); \
95 NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr); \
102 #define R_X86_64_NONE 0
103 #define R_X86_64_64 1
104 #define R_X86_64_PC32 2
105 #define R_X86_64_GOT32 3
106 #define R_X86_64_PLT32 4
107 #define R_X86_64_COPY 5
108 #define R_X86_64_GLOB_DAT 6
109 #define R_X86_64_JUMP_SLOT 7
110 #define R_X86_64_RELATIVE 8
111 #define R_X86_64_GOTPCREL 9
113 #define R_X86_64_32 10
114 #define R_X86_64_32S 11
115 #define R_X86_64_16 12
116 #define R_X86_64_PC16 13
117 #define R_X86_64_8 14
118 #define R_X86_64_PC8 15
120 #define R_X86_64_NUM 16
125 #define elf_check_arch(x) \
126 ((x)->e_machine == EM_X86_64)
128 #define ELF_CLASS ELFCLASS64
129 #define ELF_DATA ELFDATA2LSB
130 #define ELF_ARCH EM_X86_64
132 #define ELF_PLAT_INIT(regs, load_addr) do { \
133 PT_REGS_BX(regs) = 0; \
134 PT_REGS_CX(regs) = 0; \
135 PT_REGS_DX(regs) = 0; \
136 PT_REGS_SI(regs) = 0; \
137 PT_REGS_DI(regs) = 0; \
138 PT_REGS_BP(regs) = 0; \
139 PT_REGS_AX(regs) = 0; \
140 PT_REGS_R8(regs) = 0; \
141 PT_REGS_R9(regs) = 0; \
142 PT_REGS_R10(regs) = 0; \
143 PT_REGS_R11(regs) = 0; \
144 PT_REGS_R12(regs) = 0; \
145 PT_REGS_R13(regs) = 0; \
146 PT_REGS_R14(regs) = 0; \
147 PT_REGS_R15(regs) = 0; \
150 #define ELF_CORE_COPY_REGS(pr_reg, _regs) \
151 (pr_reg)[0] = (_regs)->regs.gp[0]; \
152 (pr_reg)[1] = (_regs)->regs.gp[1]; \
153 (pr_reg)[2] = (_regs)->regs.gp[2]; \
154 (pr_reg)[3] = (_regs)->regs.gp[3]; \
155 (pr_reg)[4] = (_regs)->regs.gp[4]; \
156 (pr_reg)[5] = (_regs)->regs.gp[5]; \
157 (pr_reg)[6] = (_regs)->regs.gp[6]; \
158 (pr_reg)[7] = (_regs)->regs.gp[7]; \
159 (pr_reg)[8] = (_regs)->regs.gp[8]; \
160 (pr_reg)[9] = (_regs)->regs.gp[9]; \
161 (pr_reg)[10] = (_regs)->regs.gp[10]; \
162 (pr_reg)[11] = (_regs)->regs.gp[11]; \
163 (pr_reg)[12] = (_regs)->regs.gp[12]; \
164 (pr_reg)[13] = (_regs)->regs.gp[13]; \
165 (pr_reg)[14] = (_regs)->regs.gp[14]; \
166 (pr_reg)[15] = (_regs)->regs.gp[15]; \
167 (pr_reg)[16] = (_regs)->regs.gp[16]; \
168 (pr_reg)[17] = (_regs)->regs.gp[17]; \
169 (pr_reg)[18] = (_regs)->regs.gp[18]; \
170 (pr_reg)[19] = (_regs)->regs.gp[19]; \
171 (pr_reg)[20] = (_regs)->regs.gp[20]; \
172 (pr_reg)[21] = current->thread.arch.fs; \
179 #define ELF_PLATFORM "x86_64"
182 #define FIXADDR_USER_START 0
183 #define FIXADDR_USER_END 0
185 #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
191 #define AT_SYSINFO_EHDR 33
192 #define ARCH_DLINFO NEW_AUX_ENT(AT_SYSINFO_EHDR, um_vdso_addr)
198 #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
203 #define task_pt_regs(t) (&(t)->thread.regs)
209 #define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu)
211 #define ELF_EXEC_PAGESIZE 4096
213 #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
216 #define ELF_HWCAP (elf_aux_hwcap)
218 #define SET_PERSONALITY(ex) do ; while(0)
219 #define __HAVE_ARCH_GATE_AREA 1