recategorized by
16,579 views
44 votes
44 votes

A linker is given object modules for a set of programs that were compiled separately. What information need to be included in an object module?

  1. Object code

  2. Relocation bits

  3. Names and locations of all external symbols defined in the object module

  4. Absolute addresses of internal symbols

recategorized by

1 Answer

Best answer
64 votes
64 votes
  1. is trivially there is an object module.
     
  2. must be there if we need to have relocation capability.
     
  3. is the answer. For linker to link external symbols (for example in C, to link an extern variable in one module to a global variable in another module), it must know the location of all external symbols. In C external symbols includes all global variables and function names.
     
  4. is no way needed.
edited by
Answer:

Related questions

13 votes
13 votes
6 answers
1
Kathleen asked Oct 8, 2014
6,934 views
What is the value of $X$ printed by the following program?program COMPUTE (input, output); var X:integer; procedure FIND (X:real); begin X:=sqrt(X); end; begin X:=2 FIND(...
38 votes
38 votes
3 answers
2
23 votes
23 votes
4 answers
3
Kathleen asked Oct 8, 2014
6,548 views
Translate the arithmetic expression $a^\ast -(b+c)$ into syntax tree.A grammar is said to have cycles if it is the case that $A \overset{+}{\Rightarrow} A$ Show that no g...