Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A linker is given object modules for a set of... Start Learning for Free
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?
  • a)
    Object code
  • b)
    Relocation bits
  • c)
    Names and locations of all external symbols defined in the object module
  • d)
    Absolute addresses of internal symbols
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
A linker is given object modules for a set of programs that were compi...
(c) 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. 
(a) is trivially there is an object module. (b) must be there if we need to have relocation capability. 
View all questions of this test
Most Upvoted Answer
A linker is given object modules for a set of programs that were compi...
Object modules and Linkers

Object modules are created when a source code is compiled. It contains the machine language instructions and data required to run a program. A linker is a software tool that combines these object modules to create an executable program. The linker needs to know where the different symbols, such as functions and variables, are defined and where they are used so that it can resolve these references.

Information included in an Object Module

An object module contains the following information:

1. Object Code: This is the compiled machine language instructions and data that make up the program.

2. Relocation Bits: These are bits that indicate which parts of the object code are position-independent and can be relocated to a different memory location when the program is loaded into memory. This is important because the linker needs to know which parts of the code can be moved so that it can adjust the references accordingly.

3. Names and Locations of External Symbols: These are symbols that are defined in other object modules or libraries and are used in the current module. The object module needs to include the names and locations of these symbols so that the linker can resolve their references.

4. Absolute Addresses of Internal Symbols: These are symbols that are defined in the current object module and are used within the module. The object module needs to include their absolute addresses so that the linker can adjust the references accordingly.

Conclusion

In summary, an object module needs to include information about the object code, relocation bits, names and locations of external symbols, and absolute addresses of internal symbols. This information is necessary for the linker to combine the object modules and create an executable program.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

A linker is given object modules for a set of programs that were compiled separately. What information need to be includedin an object module?a)Object codeb)Relocation bitsc)Names and locations of all external symbols defined in the object moduled)Absolute addresses of internal symbolsCorrect answer is option 'C'. Can you explain this answer?
Question Description
A linker is given object modules for a set of programs that were compiled separately. What information need to be includedin an object module?a)Object codeb)Relocation bitsc)Names and locations of all external symbols defined in the object moduled)Absolute addresses of internal symbolsCorrect answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about A linker is given object modules for a set of programs that were compiled separately. What information need to be includedin an object module?a)Object codeb)Relocation bitsc)Names and locations of all external symbols defined in the object moduled)Absolute addresses of internal symbolsCorrect answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A linker is given object modules for a set of programs that were compiled separately. What information need to be includedin an object module?a)Object codeb)Relocation bitsc)Names and locations of all external symbols defined in the object moduled)Absolute addresses of internal symbolsCorrect answer is option 'C'. Can you explain this answer?.
Solutions for A linker is given object modules for a set of programs that were compiled separately. What information need to be includedin an object module?a)Object codeb)Relocation bitsc)Names and locations of all external symbols defined in the object moduled)Absolute addresses of internal symbolsCorrect answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of A linker is given object modules for a set of programs that were compiled separately. What information need to be includedin an object module?a)Object codeb)Relocation bitsc)Names and locations of all external symbols defined in the object moduled)Absolute addresses of internal symbolsCorrect answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A linker is given object modules for a set of programs that were compiled separately. What information need to be includedin an object module?a)Object codeb)Relocation bitsc)Names and locations of all external symbols defined in the object moduled)Absolute addresses of internal symbolsCorrect answer is option 'C'. Can you explain this answer?, a detailed solution for A linker is given object modules for a set of programs that were compiled separately. What information need to be includedin an object module?a)Object codeb)Relocation bitsc)Names and locations of all external symbols defined in the object moduled)Absolute addresses of internal symbolsCorrect answer is option 'C'. Can you explain this answer? has been provided alongside types of A linker is given object modules for a set of programs that were compiled separately. What information need to be includedin an object module?a)Object codeb)Relocation bitsc)Names and locations of all external symbols defined in the object moduled)Absolute addresses of internal symbolsCorrect answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A linker is given object modules for a set of programs that were compiled separately. What information need to be includedin an object module?a)Object codeb)Relocation bitsc)Names and locations of all external symbols defined in the object moduled)Absolute addresses of internal symbolsCorrect answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev