Interview prompt
Explain from source files to a running program to an engineer who understands the surrounding system but has not used this technique. Walk from its contract to a concrete operation, then discuss where it fails or becomes expensive.
A strong answer
A build turns source text and dependencies into an executable representation through distinct stages. A compiler typically parses and checks source, translates it to an intermediate or machine representation, and emits object files. A linker resolves references across those objects and libraries to produce a loadable program.
If module A calls a function defined in module B, A’s object file can contain a symbol reference that the linker resolves. At startup, the operating system maps executable segments, prepares process state, and transfers control to runtime startup code before the application entry point.
A complete answer also calls out the assumptions that control correctness. Compilation and linking errors indicate different classes of problems: a syntax or type error occurs before object generation, while an unresolved symbol is often discovered at link time. Dynamic linking can defer library resolution to load or runtime, introducing version and search-path concerns.
Close by describing one representative test or measurement. A function declaration is visible to a source file, but the final build reports that its implementation is missing. Identify the likely build stage and two places to investigate.
Follow-up questions
Answer the follow-ups in the frontmatter. Use the linked article for the concept and the trace to make the explanation concrete.