Latest posts · 33 articlesBrowse series
[The World of Linkers—Theory 09] One Variable, a Different Address in Every Thread
2026-10-04
Follow a thread-local variable from its ELF initialization template to the current thread's memory. Decode four access models, watch the linker replace general code with fixed offsets, and reproduce the static TLS limit encountered by dynamically loaded libraries.
Read article
[The World of Linkers—Theory 08] Finding the Way Back Up the Stack
2026-10-04
A return address is only the beginning. Decode real CIEs and FDEs, follow a C++ exception through its two phases, and see how the linker makes unwind information survive garbage collection and become searchable at runtime.
Read article
[The World of Linkers—Theory 07] Leave the Last Address to Runtime
2026-10-04
Discover the runtime contract behind shared libraries: PIC, GOT and PLT entries, relocation classes, lazy binding, RELRO, interposition, symbol versions, and loader search paths. Native experiments show which decisions survive until a program actually starts.
Read article
[The World of Linkers—Lab 06] File Bytes, Memory Bytes, and Segment Permissions
2026-10-04
A code-only program is of little use. This lab adds read-only constants, initialized globals, BSS, and COMMON storage, describes them with three load segments of different permissions, and lets the kernel check the result: writing constants or executing data must end in SIGSEGV.
Read article
[The World of Linkers—Theory 06] Before main Gets a Turn
2026-10-04
Follow an ELF file through kernel mappings, zero-filled memory, demand paging, the initial stack, and C runtime startup. Then watch static PIE relocate itself and malformed images reveal the loader's validation boundaries.
Read article
[The World of Linkers—Lab 05] Calls Across Files: Merge the Code, Then Fill In the Displacements
2026-10-04
The previous executable could come only from one object with no relocations. This lab lets an assembly entry point call a C function compiled in another file: merge code sections, compute S+A-P for every field, and never leave a half-written field behind on failure.
Read article
[The World of Linkers—Theory 05] A Place for Every Section—and an Exit for Dead Code
2026-10-04
Build the bridge from input sections to loadable segments. Compare GNU ld and LLD layouts, calculate file offsets and virtual addresses, trace section garbage collection, and test what happens when a linker script gets page permissions wrong.
Read article
[The World of Linkers—Lab 04] The First Executable: Two Program Headers and an Entry Point
2026-10-04
Four stages have only read input. This lab writes output for the first time: plan a minimal executable image, serialize the ELF header and two program headers by hand, and let the Linux kernel run it and return 42.
Read article