---help---
          Support old a.out binaries in the 32bit emulation.
  
+ config X86_X32
+       bool "x32 ABI for 64-bit mode (EXPERIMENTAL)"
+       depends on X86_64 && IA32_EMULATION && EXPERIMENTAL
+       ---help---
+         Include code to run binaries for the x32 native 32-bit ABI
+         for 64-bit processors.  An x32 process gets access to the
+         full 64-bit register file and wide data path while leaving
+         pointers at 32 bits for smaller memory footprint.
+ 
+         You will need a recent binutils (2.22 or later) with
+         elf32_x86_64 support enabled to compile a kernel with this
+         option set.
+ 
  config COMPAT
        def_bool y
-       depends on IA32_EMULATION
+       depends on IA32_EMULATION || X86_X32
 +      select ARCH_WANT_OLD_COMPAT_IPC
  
  config COMPAT_FOR_U64_ALIGNMENT
        def_bool COMPAT
 
  #include <asm/processor.h>
  #include <asm/ucontext.h>
  #include <asm/i387.h>
 +#include <asm/fpu-internal.h>
  #include <asm/vdso.h>
  #include <asm/mce.h>
+ #include <asm/sighandling.h>
  
  #ifdef CONFIG_X86_64
  #include <asm/proto.h>
 
  
        current->mm->context.vdso = (void *)addr;
  
-       ret = install_special_mapping(mm, addr, vdso_size,
+       ret = install_special_mapping(mm, addr, size,
                                      VM_READ|VM_EXEC|
 -                                    VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
 -                                    VM_ALWAYSDUMP,
 +                                    VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC,
-                                     vdso_pages);
+                                     pages);
        if (ret) {
                current->mm->context.vdso = NULL;
                goto up_fail;