Linker-and-Loader

Question 1
Which of the following is a Pass 1 task in a typical assembler?
A
Generate data
B
Generate instructions
C
Look up value of symbols
D
Determine length of machine instructions
Question 1 Explanation: 
Generating data,generating instructions and look up values of symbols are done in pass 2 of assembler. But Determining length of machine instructions is done in pass 1.
Question 2
Which of the following statement(s) regarding a linker software is/are true ?
I A function of a linker is to combine several object modules into a single load module.
II A function of a linker is to replace absolute references in an object module by symbolic references to locations in other modules.
A
Only I
B
Only II
C
Both I and II
D
Neither I nor II
Question 2 Explanation: 
TRUE: A function of a linker is to combine several object modules into a single load module. → A linker combines one or more object files and possible some library code into either some executable, some library or a list of error messages.
FALSE: A function of a linker is to replace absolute references in an object module by symbolic references to locations in other modules.
Question 3
Linking :
A
cannot be performed before relocation
B
cannot be performed after relocation
C
can be performed both before and after relocation
D
is not required if relocation is performed
Question 3 Explanation: 
Linking cannot be performed after relocation.
Program execution steps:
Question 4
Relocation bits used by relocating loader are specified by
A
relocating loader itself
B
Linker
C
Assembler
D
Macro Processor
Question 4 Explanation: 
● A linker or link editor is a computer utility program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another 'object' file.
● Relocating loader in which some of the addresses in the program to be loaded are expressed relative to the start of the program rather than in absolute form.
● An assembler is a type of computer program that interprets software programs written in assembly language into machine language, code and instructions that can be executed by a computer.
● A macro processor is a program that copies a stream of text from one place to another, making a systematic set of replacements as it does so. Macro processors are often embedded in other programs, such as assemblers and compilers. Sometimes they are standalone programs that can be used to process any kind of text.
There are 4 questions to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access