Linux kernel to support $ORIGIN via eBPF
Programmable interpreter selection coming to binfmt_misc subsystem.
1Quest for Relocatable Binaries in Nix
A developer proposed adding $ORIGIN support to Linux kernel for relocatable binaries in Nix ecosystem. This feature would enable dynamic library paths relative to executable location.
2Unexpected Positive Reception
VFS maintainer Christian Brauner welcomed the proposal and suggested an eBPF-based programmable solution. This offers far more flexibility than traditional binfmt_misc approach.
3Programmable Loader with eBPF
The new system allows dynamic loader selection per binary through eBPF VM running in kernel space. This opens innovative use cases beyond just $ORIGIN support.
4Enhanced binfmt_misc Support
Christian's patch series improves binfmt_misc with new features like loader substitution (L flag), preserving process identity while maintaining compatibility.
5NixOS Integration Plans
After changes land in Linux's -next branch, a special NixOS module will be developed. It will use PT_INTERP_NIX segment to maintain backward compatibility.
6Revolution for System Programmers
This change is particularly significant for package managers like Nix and Buck/Bazel. Dynamic interpreter selection could usher new era in relocatable binary distribution.
Original article: Hacker News: Front Page — Linux çekirdeği $ORIGIN desteği ekliyor