Compiler Linker Loader Interview Preparation Guide Download PDF
Compiler Linker Loader frequently Asked Questions by expert members with experience in OS compiler linker loader. These questions and answers will help you strengthen your technical skills, prepare for the new job test and quickly revise the concepts
6 OS Compiler Linker Loader Questions and Answers:
A compiler is a program that takes a source code as an input and converts it into an object code. During the compilation process the source code goes through lexical analysis, parsing and intermediate code generation which is then optimized to give final output as an object code.
A loader loads the programs into the main memory from the storage device. The OS transparently calls the loader when needed.
Usually large applications are written into small modules and are then compiled into object codes. A linker is a program that combines these object modules to form an executable.
Many operating system environments allow dynamic linking, that is the postponing of the resolving of some undefined symbols until a program is run. That means that the executable code still contains undefined symbols, plus a list of objects or libraries that will provide definitions for these. Loading the program will load these objects/libraries as well, and perform a final linking. Dynamic linking needs no linker.
As the compiler has no information on the layout of objects in the final output, it cannot take advantage of shorter or more efficient instructions that place a requirement on the address of another object.
In IBM mainframe environments such as OS/360 this type of program is known as a linkage editor. However, a linkage editor, as the name implies, had the additional capability of allowing the addition, replacement, and/or deletion of individual program sections. Operating systems such as OS/360 had a different format for executable load-modules, in that they contained supplementary data about the component sections of a program, so that an individual program section could be replaced, and other parts of the program updated so that relocatable addresses and other such references could be corrected by the linkage editor, as part of the process.