IT lexicon › Programming › fPIC

fPIC

Programming På svenska → Updated: 2026-11-13

A compiler flag that generates position-independent code, necessary for shared libraries and modern security.

fPIC (Position Independent Code) tells the compiler to use relative addressing instead of absolute addresses. This lets the OS map the same library code to different memory locations in different processes — essential for modern ASLR (address space layout randomization) and for efficient code sharing. Nearly all modern .so and .dylib files are compiled with -fPIC. The code runs slightly slower but enables security features that have become table stakes.

← Back to the lexicon