X32 is an alternative ABI for x86-64 that uses the full 64-bit x86-64 instruction and register set and 32-bit pointers and longs. Using only 32-bit pointers limits the address space to 4 GB but uses half the space as 64-bit pointers and thus reduces memory overhead and can lead to better performance for some programs.

X32 support is added to GLIBC 2.16.

Requirements

To compile GLIBC for x32 target, you need:

Building glibc

To configure GLIBC for x32:

Bootstrap X32 GCC and GLIBC

x86-64 vs. x32

The main differences between x86-64 and x32 are:

x32 and x86-64 can share the same assembly code as well as C code with inline asm statements: