Everything You Never Wanted To Know About Linker Script
FreeIn-depth guide to linker scripts for low-level software
About Everything You Never Wanted To Know About Linker Script
A comprehensive technical blog post that explains linker scripts in detail, covering the entire toolchain from source code to executable. Written by Sunny Young de la Sota (mcyoung), the post describes how linker scripts are used as templates for organizing code in low-level software such as firmware, kernels, and drivers. It covers the linker script language syntax, its use with GNU ld and LLVM lld, and provides historical context for naming conventions. The introduction requires no prior toolchain knowledge, making it accessible to newcomers while still being detailed enough for experienced developers. The post also touches on the C compilation model, object files, and the roles of the compiler, assembler, and linker.
Key Features
Pros & Cons
- Friendly and approachable introduction to a niche topic
- Covers both GNU ld and LLVM lld for broad applicability
- Includes historical context to explain seemingly arbitrary naming
- No prior toolchain knowledge required; suitable for beginners
- Thorough explanation of the entire linking process
- Only covers POSIX linkers (not MSVC/link.exe)
- Exclusively focuses on linking executables, not shared libraries
- Single blog post may not cover every linker script edge case
- Assumes reader is interested in low-level software development