💻NixOS Module for $ORIGIN Support in Shebangs Awaits Kernel Merge
Kernel patch series paves way for relocatable binaries in NixOS
TL;DR
Christian Brauner's patch series aims to enable PT_INTERP and shebang support for $ORIGIN, allowing relocatable binaries. Once merged, a NixOS module will register this at boot.
Christian Brauner proposed a Linux kernel patch series enabling PT_INTERP and shebang support for $ORIGIN in relocatable binaries during TacoSprint 2026. This change allows binaries to be dynamically loaded with an interpreter selected via eBPF, enhancing flexibility for NixOS users. The patches will soon land in the -next branch, paving the way for a new NixOS module that registers $ORIGIN support at boot, ensuring seamless integration and backward compatibility.
Key Points
Christian Brauner proposed a Linux kernel patch series during TacoSprint 2026, aiming to enable PT_INTERP and shebang support for $ORIGIN in relocatable binaries.
The patches introduce two new dispatch modes that address issues with traditional binfmt_misc hand-off and process identity demotion.
Once merged into -next branch, a NixOS module will register $ORIGIN support at boot, ensuring seamless integration without breaking existing workflows.
Christian's solution uses eBPF to write programs in C subset that get compiled to an instruction set running within the kernel, enabling dynamic interpreter selection.
The new PT_INTERP_NIX segment allows gating on specific ELF files, maintaining backward compatibility while introducing $ORIGIN support.
Why It Matters
If you're using NixOS and need relocatable binaries with flexible interpreter selection, this patch series is a game changer. It enables dynamic loading of interpreters via eBPF, enhancing flexibility without breaking existing workflows.
Frequently Asked Questions
Why does this matter?
If you're using NixOS and need relocatable binaries with flexible interpreter selection, this patch series is a game changer. It enables dynamic loading of interpreters via eBPF, enhancing flexibility without breaking existing workflows.
What happened?
Christian Brauner's patch series aims to enable PT_INTERP and shebang support for $ORIGIN, allowing relocatable binaries. Once merged, a NixOS module will register this at boot.
Comments
Be the first to comment
Enjoyed this article?
Get it daily. 7am. Free. Reads in 5 minutes.
Join 2,179 builders reading daily.