GCSE · Computer Science · Eduqas · Spec C500QS
Linker
Picture a program in separate pieces, one calling a subroutine that sits in another piece. Each piece was translated alone. Can it run yet?
Computer Science · Structure
Three pieces, two loose ends, one program
Each box is a translated piece of object code. Dashed lines are references that are not connected yet. Tap a piece to see what the linker does with it.
Tap any part of the diagram to see what it does.
Computer Science · Linker
Reason it through
Why does a program built from separate pieces need a linker?
First link · your turn
A program is split into parts and each part is translated on its own. What do you get?
Computer Science · Translator or linker?
Whose job is it?
Each of these jobs belongs to one tool. Which one does it?
Still to sort
The translator (0)
Works on one part at a time.
Where the line is: Produces object code from one part.
The linker (0)
Works on the translated pieces.
Where the line is: Joins pieces or connects a reference between them.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
The tool that joins separately translated pieces of a program into one program you can run.
What you need to know
- Big programs are often split into parts, such as modules or files, and each part is translated on its own.
- So translation gives you several separate pieces of object code, not one complete program.
Have a goYour friend translates all three parts of their program and shouts "Done, I've got my finished program!" How many pieces of object code do they actually have, and is that one complete program?
Three separate pieces of object code, not one complete program.
Each part is translated on its own, so the translator leaves separate pieces rather than one finished program.
- A piece can call a subroutine, or use data, that is defined in another piece.
- That call or use is a reference, and after translation it is not yet connected.
Have a goPiece A contains a call to a subroutine defined in piece B, and both have just been translated. Is that call connected to its subroutine yet?
No, it is not yet connected.
A reference into another piece is still unconnected straight after translation, which is the gap the linker exists to close.
- A linker is a software development tool, used after translation, that joins the pieces of object code into one program.
- Programs usually use prewritten library code too, and the linker joins the translated library code in with your own.
- The linker connects each reference to the correct location of the code or data in the joined program.
- The linker's output is a single executable program file that can be run.
Have a goThree pieces of object code and some library code go into the linker. How many runnable programs come out the other side?
One: a single executable program file.
The linker joins everything together, so you do not get the separate pieces handed back.
- Linking lets programmers reuse already translated code, such as library code, instead of writing and translating it again.
The big picture
A program is often translated in separate parts, which leaves separate pieces of object code with references that are not yet connected. The linker, used after translation, joins those pieces and the library code they use, connects the references, and outputs one executable program.
Key points
Worked example
Problem
A quiz program is written in two parts: quiz_main and questions. quiz_main calls a subroutine called get_question, which is defined in questions. Each part has been translated on its own. Can the program be run yet? Work out what has to happen next.
⚠ Watch out
Thinking translation on its own produces the finished program, or that the linker is just another translator. The translator makes separate pieces of object code. The linker, used after translation, joins the pieces and connects their references, and its output is the single executable file.
Memory hook
Translate in pieces, link into one: the linker is the glue that connects every loose reference.
Check yourself
Without looking back: what do you have straight after translation, what is still unconnected, and what does the linker output once it has done its job?
Flashcards
(11)What is a linker?
Why might a program end up as several pieces of object code?
What does the translator produce when each part is translated on its own?
What is a reference between pieces?
Is a reference between pieces connected straight after translation?
What does the linker do to each reference?
How does library code end up in your program?
What is the output of the linker?
Why can separately translated pieces not run as one program?
What does linking let programmers avoid?
When is the linker used, compared with the translator?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Eduqas GCSE Computer Science topics
How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.