Machine-translated by Google. Questions are authored in English.
Top

Discussion

A compiler that supports separate compilation must record in each object file

  • A.the entire symbol table including all local variable names
  • B.the sequence of optimisations that were applied to the module
  • C.the symbols it defines and the symbols it leaves unresolved
  • D.the complete source text of the module for later reference

Answer: C

Correct answer: the symbols it defines and the symbols it leaves unresolved

Separate compilation means the linker must later match one module's references against another's definitions, so each object file carries two lists: the symbols it exports and the external symbols it needs.

Local variable names are not needed for linking, and appear only if debugging information is requested. The optimisations applied and the source text are irrelevant to resolution - the linker works entirely from the symbol tables and the relocation entries.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.