Tag

Farid Zakaria

1 stories

Nix wanted $ORIGIN in the kernel. It got eBPF-driven loader swaps instead. (fzakaria.com)

$ORIGIN is the token that tells a Linux loader to find dependencies relative to its own folder; ld.so has honored it for years. Nix wanted the kernel to honor it too, so packages stop hardcoding /nix/store paths: what landed instead swaps loaders through binfmt_misc via eBPF, overriding only PT_INTERP so /proc/self/exe still points at the real binary.

One catch surfaced fast: it needs root, since it can't run in an unprivileged namespace yet. And one commenter had already hand-built a similar userspace trick before this became a kernel feature.