Lines Matching +full:2 +full:x32 +full:- +full:bit

1 /* SPDX-License-Identifier: GPL-2.0 */
27 #define R_386_PC32 2
47 /* x86-64 relocation types */
49 #define R_X86_64_64 1 /* Direct 64 bit */
50 #define R_X86_64_PC32 2 /* PC relative 32 bit signed */
51 #define R_X86_64_GOT32 3 /* 32 bit GOT entry */
52 #define R_X86_64_PLT32 4 /* 32 bit PLT address */
57 #define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative
59 #define R_X86_64_32 10 /* Direct 32 bit zero extended */
60 #define R_X86_64_32S 11 /* Direct 32 bit sign extended */
61 #define R_X86_64_16 12 /* Direct 16 bit zero extended */
62 #define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */
63 #define R_X86_64_8 14 /* Direct 8 bit sign extended */
64 #define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */
65 #define R_X86_64_PC64 24 /* Place relative 64-bit signed */
89 (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486))
98 /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
110 _r->bx = 0; _r->cx = 0; _r->dx = 0; \
111 _r->si = 0; _r->di = 0; _r->bp = 0; \
112 _r->ax = 0; \
122 pr_reg[0] = regs->bx; \
123 pr_reg[1] = regs->cx; \
124 pr_reg[2] = regs->dx; \
125 pr_reg[3] = regs->si; \
126 pr_reg[4] = regs->di; \
127 pr_reg[5] = regs->bp; \
128 pr_reg[6] = regs->ax; \
129 pr_reg[7] = regs->ds; \
130 pr_reg[8] = regs->es; \
131 pr_reg[9] = regs->fs; \
133 pr_reg[11] = regs->orig_ax; \
134 pr_reg[12] = regs->ip; \
135 pr_reg[13] = regs->cs; \
136 pr_reg[14] = regs->flags; \
137 pr_reg[15] = regs->sp; \
138 pr_reg[16] = regs->ss; \
141 #define ELF_PLATFORM (utsname()->machine)
150 ((x)->e_machine == EM_X86_64)
154 (IS_ENABLED(CONFIG_X86_X32_ABI) && (x)->e_machine == EM_X86_64))
160 /*regs->ax = */ regs->bx = regs->cx = regs->dx = 0; in elf_common_init()
161 regs->si = regs->di = regs->bp = 0; in elf_common_init()
162 regs->r8 = regs->r9 = regs->r10 = regs->r11 = 0; in elf_common_init()
163 regs->r12 = regs->r13 = regs->r14 = regs->r15 = 0; in elf_common_init()
164 t->fsbase = t->gsbase = 0; in elf_common_init()
165 t->fsindex = t->gsindex = 0; in elf_common_init()
166 t->ds = t->es = ds; in elf_common_init()
170 elf_common_init(&current->thread, _r, 0)
173 elf_common_init(&current->thread, regs, __USER_DS)
175 void compat_start_thread(struct pt_regs *regs, u32 new_ip, u32 new_sp, bool x32);
177 compat_start_thread(regs, new_ip, new_sp, ex->e_machine == EM_X86_64)
194 (pr_reg)[0] = (regs)->r15; \
195 (pr_reg)[1] = (regs)->r14; \
196 (pr_reg)[2] = (regs)->r13; \
197 (pr_reg)[3] = (regs)->r12; \
198 (pr_reg)[4] = (regs)->bp; \
199 (pr_reg)[5] = (regs)->bx; \
200 (pr_reg)[6] = (regs)->r11; \
201 (pr_reg)[7] = (regs)->r10; \
202 (pr_reg)[8] = (regs)->r9; \
203 (pr_reg)[9] = (regs)->r8; \
204 (pr_reg)[10] = (regs)->ax; \
205 (pr_reg)[11] = (regs)->cx; \
206 (pr_reg)[12] = (regs)->dx; \
207 (pr_reg)[13] = (regs)->si; \
208 (pr_reg)[14] = (regs)->di; \
209 (pr_reg)[15] = (regs)->orig_ax; \
210 (pr_reg)[16] = (regs)->ip; \
211 (pr_reg)[17] = (regs)->cs; \
212 (pr_reg)[18] = (regs)->flags; \
213 (pr_reg)[19] = (regs)->sp; \
214 (pr_reg)[20] = (regs)->ss; \
223 /* I'm not sure if we can use '-' here */
235 * 64-bit, this is above 4GB to leave the entire 32-bit address
236 * space open for things that want to use the area for 32-bit pointers.
239 (DEFAULT_MAP_WINDOW / 3 * 2))
273 * ---------------------|------------|------------------|----------------|
274 * missing PT_GNU_STACK | exec-all | exec-all | exec-none |
275 * PT_GNU_STACK == RWX | exec-stack | exec-stack | exec-stack |
276 * PT_GNU_STACK == RW | exec-none | exec-none | exec-none |
278 * exec-all : all PROT_READ user mappings are executable, except when
279 * backed by files on a noexec-filesystem.
280 * exec-none : only PROT_EXEC user mappings are executable.
281 * exec-stack: only the stack and PROT_EXEC user mappings are executable.
330 /* 1GB for 64bit, 8MB for 32bit */
338 (unsigned long __force)current->mm->context.vdso); \
342 /* As a historical oddity, the x32 and x86_64 vDSOs are controlled together. */
347 (unsigned long __force)current->mm->context.vdso); \
354 if (exec->e_machine == EM_X86_64) \
363 #define VDSO_CURRENT_BASE ((unsigned long)current->mm->context.vdso)
366 ((unsigned long)current->mm->context.vdso + \
375 int uses_interp, bool x32);
378 (ex->e_machine == EM_X86_64))
384 ALIGN_VA_32 = BIT(0),
385 ALIGN_VA_64 = BIT(1),