Tag · Relocations

4 articles to explore.

[The World of Linkers—Theory 09] One Variable, a Different Address in Every Thread
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—Lab 04] The First Executable: Two Program Headers and an Entry Point
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
[The World of Linkers—Theory 04] Relocation: Four Bytes Between Caller and Callee
Follow a runnable Linux program from an unresolved call to four final instruction bytes. Distinguish section offsets, file offsets, P, and next RIP before deriving S+A-P; then explore negative displacements, absolute pointers, addends, overflow, and instruction relaxation.
Read article
[The World of Linkers—Lab 01] Sections and Names: Carving Bytes into Regions
Decode section descriptors, borrow payload bytes, and resolve names so later stages consume named Sections instead of rereading raw fields.
Read article