Linker-and-Loader

Question 1
Relocation bits used by relocating loader are specified by
A
relocating loader itself
B
Linker
C
Assembler
D
Macro Processor
       Operating-Systems       Linker-and-Loader       Nielit Scientist-C 2016 march
Question 1 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.
Question 2
The most powerful parser is
A
SLR
B
LALR
C
Canonical LR
D
Operator Precedence
       Operating-Systems       Linker-and-Loader       Nielit Scientist-C 2016 march
Question 2 Explanation: 
Canonical LR is more powerful than SLR as every grammar which can be parsed by SLR parser, can also be parsed by CLR parser.
So CLR > LALR > SLR
In computer science, a canonical LR parser or LR(1) parser is an LR(k) parser for k=1, i.e. with a single lookahead terminal. The special attribute of this parser is that any LR(k) grammar with k>1 can be transformed into an LR(1) grammar.However, back-substitutions are required to reduce k and as back-substitutions increase, the grammar can quickly become large, repetitive and hard to understand. LR(k) can handle all deterministic context-free languages.
Question 3
A linker is given object module for a set of programs that were compiled separately. What information need not 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
       Operating-Systems       Linker-and-Loader       Nielit Scientist-B CS 2016 march
Question 3 Explanation: 
● In object module it includes names and locations of all external symbols defined in the object module.
● To link to external symbols it must know the location of external symbols.
● So object module won’t consists of absolute addresses of internal symbols , Option D is correct.
Question 4

Which of the following is the first module of a language processing system?

A
Preprocessor
B
Loader
C
Compiler
D
Linker
       Operating-Systems       Linker-and-Loader       JT(IT) 2018 PART-B Computer Science
Question 4 Explanation: 
→ Preprocessor is a program that processes its input data to produce output that is used as input to another program.
→ The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers.
→ The amount and kind of processing done depends on the nature of the preprocessor.
→ Preprocessor is the first module of a language processing system.
Question 5
OLE, a microsoft's component document technology, means
A
Overlay linking and exchange
B
Online linking and embedding
C
Open learning exchange
D
Object linking and embedding
       Operating-Systems       Linker-and-Loader       KVS DEC-2017
Question 5 Explanation: 
→ Object Linking & Embedding (OLE) is a proprietary technology developed by Microsoft that allows embedding and linking to documents and other objects. → For developers, it brought OLE Control Extension (OCX), a way to develop and use custom user interface elements. On a technical level, an OLE object is any object that implements the IOleObject interface, possibly along with a wide range of other interfaces, depending on the object's needs.
Question 6
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
       Operating-Systems       Linker-and-Loader       UGC NET CS 2017 Jan -paper-2
Question 6 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 7
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
       Operating-Systems       Linker-and-Loader       UGC NET CS 2006 Dec-paper-2
Question 7 Explanation: 
Linking cannot be performed after relocation.
Program execution steps:
Question 8
Which statement is wrong ?
A
If linked origin ≠ translated origin, relocation must be performed by the linker
B
If load ≠ linked origin, the loader must perform relocation
C
A linker always perform relocation, whereas some loaders do not
D
None of these
       Operating-Systems       Linker-and-Loader       UGC NET CS 2006 June-Paper-2
Question 8 Explanation: 
Relocation is the process of assigning load addresses for position-dependent code and data of a program and adjusting the code and data to reflect the assigned addresses.
A linker usually performs relocation in conjunction with symbol resolution, the process of searching files and libraries to replace symbolic references or names of libraries with actual usable addresses in memory before running a program.
Relocation is typically done by the linker at link time, but it can also be done at load time by a relocating loader, or at run time by the running program itself. Some architectures avoid relocation entirely by deferring address assignment to run time; this is known as zero address arithmetic
A linker or link editor is a computer utility program that takes one or more object files generated by a compiler or an assembler and combines them into a single executable file, library file, or another 'object' file.
A simpler version that writes its output directly to memory is called the loader, though loading is typically considered a separate process
Question 9
The process of assigning load addresses to the various parts of the program and adjusting the code and data in the program to reflect the assigned addresses is called _______.
A
Symbol resolution
B
Parsing
C
Assembly
D
Relocation
       Operating-Systems       Linker-and-Loader       UGC NET CS 2013 Dec-paper-2
Question 9 Explanation: 
The process of assigning load addresses to the various parts of the program and adjusting the code and data in the program to reflect the assigned addresses is called relocation.
Question 10
Object modules generated by assembler that contains unresolved external references are resolved for two or more object module by a/an
A
Operating system
B
Loader
C
Linker
D
Compiler
       Operating-Systems       Linker-and-Loader       UGC NET CS 2011 June-Paper-2
Question 10 Explanation: 
Object modules generated by assembler that contains unresolved external references are resolved for two or more object module by a Linker.
Question 11
Which of the following can be accessed by transfer vector approach of linking ?
A
External data segments
B
External subroutine
C
Data located in other procedure
D
All of the above
       Operating-Systems       Linker-and-Loader       UGC NET CS 2011 June-Paper-2
Question 11 Explanation: 
→ External subroutines are routines that are created and maintained separately from the program that will be calling them.
→ External subroutine can be accessed by transfer vector approach of linking.
Question 12
Object code is the output of ______.
A
Operating System
B
Compiler or Assembler
C
only Assembler
D
only compiler
       Operating-Systems       Linker-and-Loader       UGC NET CS 2010 Dec-Paper-2
Question 12 Explanation: 
Object code is the output of Compiler or Assembler.
Question 13
In an absolute loading scheme, which loader function is accomplished by a loader ?
A
Re-allocation
B
Allocation
C
Linking
D
Loading
       Operating-Systems       Linker-and-Loader       UGC NET CS 2010 June-Paper-2
Question 13 Explanation: 
Loader loads the executable code into memory, program and data stack are created, register gets initialized.
Question 14
The linker :
A
is similar to interpreter
B
uses source code as its input
C
is required to create a load module
D
none of the above
       Operating-Systems       Linker-and-Loader       UGC NET CS 2009-June-Paper-2
Question 14 Explanation: 
The linker is required to create a load module. Object modules generated by assembler that contains unresolved external references are resolved for two or more object module by a Linker.
Question 15
In an absolute loading scheme, which loader function is accomplished by programmer ?
A
Allocation
B
Linking
C
Rellocation
D
Both (A) and (B)
       Operating-Systems       Linker-and-Loader       UGC NET CS 2007 June-Paper-2
Question 15 Explanation: 
→ Loader loads the executable code into memory, program and data stack are created, register gets initialized.
→ Re-allocation is an absolute loading scheme which loader function is accomplished by assembler
Question 16
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
       Operating-Systems       Linker-and-Loader       TNPSC-2017-Polytechnic-CS
Question 16 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.
There are 16 questions to complete.
PHP Code Snippets Powered By : XYZScripts.com
error: Content is protected !!