Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

position-independent code

Machine code that works correctly wherever it is placed in memory, because it never stores its own absolute addresses.

Position-independent code (PIC, -fPIC) reaches its own code and data PC-relatively and other modules' symbols through a global offset table, so its text needs no load-time relocations and one copy can be mapped at different addresses in different processes.

Examples

  • PIC reaches a global with [rip + x] instead of a fixed address, so the code runs at any load address.

Read the full section →