Detour: A Static Library Enabling Dynamic Linking in Statically Linked Linux Executables
By
generichuman
A baker's-dozen of insight crammed into one ring.
Summary
Detour is a static library for Linux that enables building statically linked executables while still providing dynamic linking capabilities at runtime. It allows developers to dlopen libraries, resolve symbols, and mix multiple C runtimes in the same process without linking against libc directly, bridging the gap between static and dynamic linking approaches.
Key quotes
· 3 pulledDetour 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.
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.
You might also wanna read
Technical Analysis of Linux Binary Compatibility Using musl libc and dlopen
The article discusses the technical challenge of achieving Linux binary compatibility using musl libc and dlopen, focusing on creating porta
Three Years In: A Senior Engineer's Reflection on AI's Impact on the Software Development Role
A senior engineer reflects on the long-term sustainability of AI tools in software development, three years into deep organizational adoptio
Three Years In: A Senior Engineer's Reflection on AI's Impact on the Software Development Role
A senior engineer reflects on the long-term sustainability of AI tools in software development, three years into deep organizational adoptio
Bijou64: A variable-length integer encoding that's both correct and accidentally fast
This article describes the development of bijou64, a variable-length integer (varint) encoding created for the Subduction CRDT sync protocol
Bijou64: A variable-length integer encoding that's both correct and accidentally fast
This article describes the development of bijou64, a variable-length integer (varint) encoding created for the Subduction CRDT sync protocol
Domain Expertise, Not Code, Is the True Competitive Advantage in Software
The article argues that true competitive advantage ("moat") in software has always been domain expertise—deep understanding of the business
