A C program is spread over several source files. Which tool joins the object files into one executable?
The linker, which also pulls in needed libraries.
- The compiler
- The assembler
- The linker ✔
Why: In the usual pipeline, a compiler produces assembly and an assembler produces object files. The linker resolves references among those object files and needed libraries, then combines them into an executable.
Huh, didn't know that: An undefined reference commonly appears during linking when no object file or library supplies a required symbol.
Why did the object files call the linker? They wanted to get it all together.
References
Answer: The linker. In the usual pipeline, a compiler produces assembly and an assembler produces object files. The linker resolves references among those object files and needed libraries, then combines them into an executable.
- OpenStax Introduction to Computer Science 5.4: Machine-Level Program Representation openstax.org/books/introduction-computer-science/pages/5-4-machine-level-program-representation
The linker takes all the generated object files, looks for needed libraries, and links everything together into one executable file.
Checked 2026-10-10.
Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.
More stuff everyone should know
That's stuff everyone should know.