Tech News
← Back to articles

Detour: Dynamic linking on Linux without Libc

read original related products more articles

Detour

On Linux, the traditional divide between statically and dynamically linked executables can feel like a hard wall. Either you bundle everything into your binary, or you accept full dependency on the system's libc and dynamic linker. But Detour, a tiny static library, blows a hole clean through that wall.

Detour lets you build statically linked executables, with no dependency on glibc or musl while still giving you access to dynamic linking at runtime. You can dlopen libraries, resolve symbols, and even mix multiple C runtimes in the same process, all without ever linking against libc directly.

What Is Detour?

At its core, Detour is a minimal bootstrap layer that gives your application access to the system dynamic linker ld-linux.so without requiring libc at all. It allows:

Dynamically loading libraries without linking libc

Capturing libdl functionality (e.g., dlopen , dlsym ) inside a fully static executable

functionality (e.g., , ) inside a fully static executable Mixing different libcs in one process

Creating freestanding, zero-libc ELF executables

All while remaining entirely under your control, with no extra dependencies or runtime overhead.

... continue reading