diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/elf.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/include/asm-x86/elf.h b/include/asm-x86/elf.h index 70edff2d5671..60f5101d9483 100644 --- a/include/asm-x86/elf.h +++ b/include/asm-x86/elf.h | |||
@@ -74,17 +74,19 @@ typedef struct user_fxsr_struct elf_fpxregset_t; | |||
74 | 74 | ||
75 | #ifdef __KERNEL__ | 75 | #ifdef __KERNEL__ |
76 | 76 | ||
77 | /* | ||
78 | * This is used to ensure we don't load something for the wrong architecture. | ||
79 | */ | ||
80 | #define elf_check_arch_ia32(x) \ | ||
81 | (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486)) | ||
82 | |||
77 | #ifdef CONFIG_X86_32 | 83 | #ifdef CONFIG_X86_32 |
78 | #include <asm/processor.h> | 84 | #include <asm/processor.h> |
79 | #include <asm/system.h> /* for savesegment */ | 85 | #include <asm/system.h> /* for savesegment */ |
80 | #include <asm/desc.h> | 86 | #include <asm/desc.h> |
81 | #include <asm/vdso.h> | 87 | #include <asm/vdso.h> |
82 | 88 | ||
83 | /* | 89 | #define elf_check_arch(x) elf_check_arch_ia32(x) |
84 | * This is used to ensure we don't load something for the wrong architecture. | ||
85 | */ | ||
86 | #define elf_check_arch(x) \ | ||
87 | (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486)) | ||
88 | 90 | ||
89 | /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx | 91 | /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx |
90 | contains a pointer to a function which might be registered using `atexit'. | 92 | contains a pointer to a function which might be registered using `atexit'. |
@@ -247,10 +249,6 @@ extern int dump_task_extended_fpu (struct task_struct *, | |||
247 | #define ELF_CORE_XFPREG_TYPE NT_PRXFPREG | 249 | #define ELF_CORE_XFPREG_TYPE NT_PRXFPREG |
248 | 250 | ||
249 | #define VDSO_HIGH_BASE (__fix_to_virt(FIX_VDSO)) | 251 | #define VDSO_HIGH_BASE (__fix_to_virt(FIX_VDSO)) |
250 | #define VDSO_CURRENT_BASE ((unsigned long)current->mm->context.vdso) | ||
251 | |||
252 | #define VDSO_ENTRY \ | ||
253 | ((unsigned long) VDSO32_SYMBOL(VDSO_CURRENT_BASE, vsyscall)) | ||
254 | 252 | ||
255 | /* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ | 253 | /* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ |
256 | 254 | ||
@@ -262,6 +260,8 @@ do if (vdso_enabled) { \ | |||
262 | 260 | ||
263 | #else /* CONFIG_X86_32 */ | 261 | #else /* CONFIG_X86_32 */ |
264 | 262 | ||
263 | #define VDSO_HIGH_BASE 0xffffe000U /* CONFIG_COMPAT_VDSO address */ | ||
264 | |||
265 | /* 1GB for 64bit, 8MB for 32bit */ | 265 | /* 1GB for 64bit, 8MB for 32bit */ |
266 | #define STACK_RND_MASK (test_thread_flag(TIF_IA32) ? 0x7ff : 0x3fffff) | 266 | #define STACK_RND_MASK (test_thread_flag(TIF_IA32) ? 0x7ff : 0x3fffff) |
267 | 267 | ||
@@ -272,6 +272,11 @@ do if (vdso_enabled) { \ | |||
272 | 272 | ||
273 | #endif /* !CONFIG_X86_32 */ | 273 | #endif /* !CONFIG_X86_32 */ |
274 | 274 | ||
275 | #define VDSO_CURRENT_BASE ((unsigned long)current->mm->context.vdso) | ||
276 | |||
277 | #define VDSO_ENTRY \ | ||
278 | ((unsigned long) VDSO32_SYMBOL(VDSO_CURRENT_BASE, vsyscall)) | ||
279 | |||
275 | struct linux_binprm; | 280 | struct linux_binprm; |
276 | 281 | ||
277 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | 282 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 |