Hasty Briefsbeta

Bilingual

Linux kernel will support $ORIGIN, sort of

9 hours ago
  • The goal is to support relocatable binaries in Nix by allowing $ORIGIN in PT_INTERP and shebang.
  • Christian Brauner suggested using eBPF for programmable interpreter selection via binfmt_misc, rather than a kernel patch.
  • An eBPF program can match ELF files and dynamically determine the interpreter path, supporting $ORIGIN.
  • A new binfmt_misc flag 'L' enables loader substitution, making the interpreter override transparent and preserving process identity.
  • Future plans include a NixOS module that registers the BPF handler at boot, gated on a new PT_INTERP_NIX segment for opt-in.