The linker:

2009

The linker:

Answer: C. is required to create a load moduleA language processing system converts a source program into an executable program through several stages: preprocessing, compilation/translation into object…

  1. A.

    is similar to interpreter

  2. B.

    uses source code as its input

  3. C.

    is required to create a load module

  4. D.

    none of the above

Attempted by 178 students.

Show answer & explanation

Correct answer: C

A language processing system converts a source program into an executable program through several stages: preprocessing, compilation/translation into object code, and finally linking and loading. The linker's specific job in this pipeline is to combine one or more independently translated object modules — plus any needed library routines — resolving all external symbol references between them, into a single relocatable or executable unit called a load module. The output of a linker is therefore always an object-code-level artifact, never a re-parse of the original source text, and it does not itself execute any instructions — it only prepares them for a loader to place in memory.

For this stem, the four options describe candidate behaviors of a linker. Working through the standard compilation pipeline: the compiler (and assembler) is the stage that consumes source code text and produces object modules; the linker then takes those already-compiled object modules as its input, resolves the external references between them (for example a call to a function defined in a different module or a library), and combines them into one load module that can be handed to a loader for execution. This load-module-creation step is exactly what a linker is required to perform, and the load module it produces is what actually gets loaded into memory to run.

  • is similar to interpreter — an interpreter directly reads and executes program statements one at a time (from source or an intermediate form) without producing a separate persisted linked file; the linker's step, by contrast, is a static file-combining step that finishes before any execution begins.

  • uses source code as its input — source code is the input consumed by the compiler/assembler stage of the pipeline; by the time linking happens, the program has already been translated into object modules, which is what the linker actually reads.

  • none of the above — this option would only hold if none of the specific listed roles matched the linker's function, which is not the case given the pipeline stage the linker occupies.

Only the description of combining object modules into a load module matches what a linker actually does in a language-processing pipeline, which is why creating a load module is the property that defines a linker's role.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…