IT lexicon › Programming › Patchelf

Patchelf

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

Tool for modifying ELF binaries by changing RPATH, SONAME, and other linking properties without recompilation.

Patchelf (by Eelco Dolstra) lets you change which shared libraries a binary links against, how it searches for libraries, and what name it exposes — all without recompiling or relinking. Combined with reproducible distribution, it enables portable binaries: you can move the library directory and let patchelf update RPATH accordingly. Increasingly common in Nix, containers, and distributed binary packages as an alternative to hardcoding rpath at build time. Other tools: `install_name_tool` (macOS), `objcopy` (manual but slower).

← Back to the lexicon