Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sys_interp

Exec-time ABI router for ZainiumOS. Reads a binary's PT_INTERP before it runs and picks the right interpreter, so glibc- and musl-built binaries can both run without recompiling.

Not part of Zex (the package manager) — a separate, standalone tool.

Why

A binary's compiled code already assumes glibc- or musl-sized structs (pthread_mutex_t, FILE, etc.) before any libc code runs. That decision can't be made per call — it has to be made once, at exec time, for the whole process. sys_interp is that decision point. See PLAN.md for the full design and phased build plan.

Status

Early. src/elf.rs reads PT_INTERP from an ELF64 binary, personality.rs classifies it as glibc/musl/static/unknown, exec.rs/main.rs re-exec through the resolved interpreter or fall back to running the binary unmodified. No personality build exists yet, so resolve_ld_so() always returns None and every binary currently runs unmodified. Not wired into binfmt_misc yet — see the open risk in PLAN.md first.

Build

cargo build --release

Targets x86_64-unknown-linux-musl with crt-static by default (set in .cargo/config.toml) — the binary must not depend on the ABI it routes.

Test

cargo test --release

About

Exec-time libc ABI personality router

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages