Skip to content

Glossary

PIE (position-independent executable)

An executable compiled so it can run at any address, letting ASLR randomize the program's own code and data, not only its libraries.

A position-independent executable (PIE) is compiled with relative addressing (-fPIE) and linked with -pie, so the loader can place it at any base address. Without PIE, the main program always loads at the same fixed address, leaving its code and data predictable even when ASLR randomizes the stack and libraries.

Most Linux distributions build PIE by default, and the cost on x86-64 is small. You can verify it with readelf -h (type DYN) and the PIE flag in readelf -d, or with checksec. See binary hardening flags.