Skip to content
Tech News
← Back to articles

Linux kernel will support $ORIGIN, sort of

read original more articles
Why This Matters

The Linux kernel's upcoming support for $ORIGIN, facilitated through patches and innovative use of eBPF, marks a significant step toward more flexible and dynamic binary execution. This development benefits the tech industry by enabling advanced use cases like relocatable binaries in package managers such as Nix, ultimately enhancing system customization and efficiency for consumers.

Key Takeaways

For some reason, during TacoSprint 2026 I decided to see if we could tackle relocatable binaries in Nix.

I enjoy these lofty goals to push Nix and the surrounding ecosystem forward. I am bold if not stupid.

I left the last earlier post with one potential idea of how to get there:

We could patch the Linux kernel so that $ORIGIN is supported in PT_INTERP and the shebang.

I waded through the complexity of sending patches over email (turns out I actually enjoy this workflow!), and sent a proposal to the Linux kernel mailing list.

My first attempt here proposed simply adding direct support for $ORIGIN in the Virtual File System (VFS) subsystem.

I waited nervously. I was expecting the result from what I had come to read about online; someone non-politely telling me to F$#CK OFF because there is something I missed, misunderstood or did not consider. 🤬

The result was completely different. 😲

Christian Brauner, the maintainer for VFS responded to me in good faith, asking for the rationale for the change and eventually proposing some ways in which such a support could make it into the subsystem.

Note It definitely helped having someone like John Ericson chime in and advocate why having a non-fixed interpreter ( PT_INTERP ) is useful to Nix and other use-cases (i.e. Buck & Bazel).

... continue reading