Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/nornir

crates/mimir-libc/README.md

nornir-mimir-libc

Mímir's model of a C run-time. Everything the graph builders know that differs per libc sits behind one trait, LibcModel, with three implementations: Glibc, Musl and Eyra (origin + c-scape + rustix + the unwinding crate). A tool picks one by name (by_name("glibc" | "musl" | "eyra")) or from the image (detect); the code that uses it never matches on a libc name.

method glibc musl Eyra
thread_start pthread_create → __clone3/clone3/__clone/clone pthread_create → __clone c-scape pthread_create, origin thread::create → inline asm in origin::arch::clone
syscall_entries syscall() (number = argument 0), __internal_syscall_cancel (argument 6) syscall(), __syscall_cp, __syscall_cp_c (argument 0), __syscall_cp_asm (argument 1) c-scape syscall() (a jump table on the number), rustix's wrappers (each its own constant)
program_start _start, __libc_start_main _start, _start_c, __libc_start_main _start (origin), origin::program::entry
unwinding libgcc LLVM libunwind the unwinding crate
libc_map generated glibc map generated musl map none

All three unwinders read the same tables (.eh_frame and the LSDA call-site tables), so a decoder that reads landing pads asks unwinding().reads_lsda() and nothing else.

No dependencies: any crate (and Heimdall's library trees) may link it.