SlideShare uma empresa Scribd logo
1 de 33
CHAPTER-4
Linkers and Loaders
Introduction
Linker
• A System Software that Combines two or more separate object
programs and supplies the information needed to allow references
between them .
• Two Types
– Dynamic Linking
– Static Linking
• Static Linking:
– Static linkers takes input a collection of relocatable object files and
command line arguments and generate as output a fully linked
executable object file that can be loaded and run.
• Dynamic Linking:
– The addresses of called procedures aren’t bound until the first call.
– Programs can bind to libraries as the programs are running, loading
libraries in the middle of program execution.
– This provides a powerful and high-performance way to extend the
function of programs
– MS Windows extensively uses DLL (Dynamic Linked Libraries)
Introduction (Contd..)
 Loader
• The loader, which accepts the program form, produced by a translator &
certain other program forms from a library to produce one ready – to –
execute machine language program.
• A unit of input to the loader is known as an object program or an object
module.
• The process of merging many object modules to from a single machine
language program is known as linking.
Difference between Linker and Loader
• Linker is a program that takes one or more
objects generated by a compiler and combines
them into a single executable program.
• Loader is the part of an operating system that
is responsible for loading programs from
executables (i.e., executable files) into
memory, preparing them for execution and
then executing them.
LOADER
• The loader is program, which accepts the object program , prepares
this program for execution by the computer and initializes
the execution.
• Loader loads the referred resource or file after being Linked to
referrer via a Linker during the execution of program.
• In particular the loader must perform four functions:
1. Allocate space in memory for the program (allocation).
2. Resolve symbolic references between objects decks (linking).
3. Adjust all address dependent locations, such as address constants,
to correspond to the allocated space (relocation).
4. Physically place the machine instructions and data into memory
(loading).
Important Terms
• Translation time address: Translation time address is used at
the translation time. This address is assigned by translator
• Linked time address: Link time address is used at the link
time. This address is assigned by linker
• Load time address: Load time address is used at the load
time. This address is assigned by loader
• Translated origin: Address of origin assumed by the translator
• Linked origin: Address of origin assumed by the linker while
producing a binary program
• Load origin: Address of origin assumed by the loader
while loading the program for execution.
Relocation of Linking Concept
• Program relocation is the process of modifying the addresses
used in the address sensitive instruction of a program such that
the program can execute correctly from the designated area of
memory.
• If linked origin≠ translated origin, relocation must be
performed by the linker.
• If load origin≠ linked origin, relocation must be performed
by the loader.
Relocation of Linking Concept(Contd..)
• Let AA be the set of absolute address - instruction or data addresses
used in the instruction of a program P.
• AA≠ ф implies that program P assumes its instructions and data to
occupy memory words with specific addresses.
• Such a program – called an address sensitive program – contains
one or more of the following:
-An address sensitive instruction: an instruction which uses an
address a∈AA.
-An address constant: a data word which contains an address a∈AA.
• An address sensitive program P can execute correctly only if the start
address of the memory area allocated to it is the same as its
translated origin.
• To execute correctly from any other memory area, the address used
in each address sensitive instruction of P must be ‘corrected’.
Relocation of Linking Concept(Contd..)
• Performing Relocation::
Relocation of Linking Concept(Contd..)
• Performing Linking::
OBJECT
FILES
SHARED
LIBRARIES
NORMAL
LIBRARIESCONTROL
FILES
DEBUG
SYMBOL
FILE EXECUTAB
LE FILE
LINK/LOAD
MAP
LINKER
COMMANDLINE
LINKING PROCESS
Self Relocating Programs
Design of a linker
Design of a linker (Contd..)
Design of a linker (Contd..)
MS-DOS Linker
MS-DOS Linker (Contd..)
MS-DOS Linker (Contd..)
MS-DOS Linker (Contd..)
Linking of Overlay Structured Programs
Linking of Overlay Structured Programs
Dynamic Linking
Different Loading Schemes
Different Loading Schemes(Contd..)
Different Loading Schemes(Contd..)
Different Loading Schemes(Contd..)
Different Loading Schemes(Contd..)
Linking Loaders
A linking loaders performs
» All linking and relocation operations
» Automatic library search
» Loads the linked program directly into memory for execution
A linkage editor
» Produces a linked version of program (often called a load module or an
executable image which is written to a file or module or an executable
image), which is written to a file or library for later execution
» A simple relocating loader can be used to load the linked version of
program into memory version of program into memory
– The loading can be accomplished in one pass with no external symbol
table required
Linking Loaders
Ch 4 linker loader

Mais conteúdo relacionado

Mais procurados (20)

Linker and Loader
Linker and Loader Linker and Loader
Linker and Loader
 
Unit 4 sp macro
Unit 4 sp macroUnit 4 sp macro
Unit 4 sp macro
 
Linking in MS-Dos System
Linking in MS-Dos SystemLinking in MS-Dos System
Linking in MS-Dos System
 
Assemblers
AssemblersAssemblers
Assemblers
 
Unit 3
Unit 3Unit 3
Unit 3
 
Loader and Its types
Loader and Its typesLoader and Its types
Loader and Its types
 
Unit 3 sp assembler
Unit 3 sp assemblerUnit 3 sp assembler
Unit 3 sp assembler
 
Single Pass Assembler
Single Pass AssemblerSingle Pass Assembler
Single Pass Assembler
 
Design of a two pass assembler
Design of a two pass assemblerDesign of a two pass assembler
Design of a two pass assembler
 
System Programming- Unit I
System Programming- Unit ISystem Programming- Unit I
System Programming- Unit I
 
Loaders
LoadersLoaders
Loaders
 
Macro-processor
Macro-processorMacro-processor
Macro-processor
 
Direct linking loader
Direct linking loaderDirect linking loader
Direct linking loader
 
Language processors
Language processorsLanguage processors
Language processors
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loaders
 
System Programming Unit II
System Programming Unit IISystem Programming Unit II
System Programming Unit II
 
System programming
System programmingSystem programming
System programming
 
Input-Buffering
Input-BufferingInput-Buffering
Input-Buffering
 
Macro assembler
 Macro assembler Macro assembler
Macro assembler
 
Role-of-lexical-analysis
Role-of-lexical-analysisRole-of-lexical-analysis
Role-of-lexical-analysis
 

Semelhante a Ch 4 linker loader

linker & loader presentation in Compiler Design
linker & loader presentation in Compiler Designlinker & loader presentation in Compiler Design
linker & loader presentation in Compiler DesignAbhishekKumar117405
 
Loaders and Linkers
Loaders and LinkersLoaders and Linkers
Loaders and Linkerskunj desai
 
Build process ppt.pptx
Build process ppt.pptxBuild process ppt.pptx
Build process ppt.pptxSHIVANISRECECE
 
Loaders complete
Loaders completeLoaders complete
Loaders completeFaisal Shah
 
Hm system programming class 1
Hm system programming class 1Hm system programming class 1
Hm system programming class 1Hitesh Mohapatra
 
System software module 3 presentation file
System software module 3 presentation fileSystem software module 3 presentation file
System software module 3 presentation filejithujithin657
 
System software module 3 presentation file
System software module 3 presentation fileSystem software module 3 presentation file
System software module 3 presentation filejithujithin657
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction Thapar Institute
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to CompilersAkhil Kaushik
 
Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02riddhi viradiya
 
Compiler Design Introduction
Compiler Design IntroductionCompiler Design Introduction
Compiler Design IntroductionKuppusamy P
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction Sarmad Ali
 
System software module 1 presentation file
System software module 1 presentation fileSystem software module 1 presentation file
System software module 1 presentation filejithujithin657
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler ConstructionAhmed Raza
 
Address Binding Scheme
Address Binding SchemeAddress Binding Scheme
Address Binding SchemeRajesh Piryani
 

Semelhante a Ch 4 linker loader (20)

linker & loader presentation in Compiler Design
linker & loader presentation in Compiler Designlinker & loader presentation in Compiler Design
linker & loader presentation in Compiler Design
 
Linkers in compiler
Linkers in compilerLinkers in compiler
Linkers in compiler
 
Linkers
LinkersLinkers
Linkers
 
Loaders and Linkers
Loaders and LinkersLoaders and Linkers
Loaders and Linkers
 
Build process ppt.pptx
Build process ppt.pptxBuild process ppt.pptx
Build process ppt.pptx
 
Loaders complete
Loaders completeLoaders complete
Loaders complete
 
Hm system programming class 1
Hm system programming class 1Hm system programming class 1
Hm system programming class 1
 
System software module 3 presentation file
System software module 3 presentation fileSystem software module 3 presentation file
System software module 3 presentation file
 
System software module 3 presentation file
System software module 3 presentation fileSystem software module 3 presentation file
System software module 3 presentation file
 
Linkers And Loaders
Linkers And LoadersLinkers And Loaders
Linkers And Loaders
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilers
 
Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02Unit1 111206003944-phpapp02
Unit1 111206003944-phpapp02
 
System software-loaders
System software-loadersSystem software-loaders
System software-loaders
 
wk 4 -- linking.ppt
wk 4 -- linking.pptwk 4 -- linking.ppt
wk 4 -- linking.ppt
 
Compiler Design Introduction
Compiler Design IntroductionCompiler Design Introduction
Compiler Design Introduction
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
System software module 1 presentation file
System software module 1 presentation fileSystem software module 1 presentation file
System software module 1 presentation file
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Address Binding Scheme
Address Binding SchemeAddress Binding Scheme
Address Binding Scheme
 

Último

(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 

Último (20)

(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 

Ch 4 linker loader

  • 2.
  • 3. Introduction Linker • A System Software that Combines two or more separate object programs and supplies the information needed to allow references between them . • Two Types – Dynamic Linking – Static Linking • Static Linking: – Static linkers takes input a collection of relocatable object files and command line arguments and generate as output a fully linked executable object file that can be loaded and run. • Dynamic Linking: – The addresses of called procedures aren’t bound until the first call. – Programs can bind to libraries as the programs are running, loading libraries in the middle of program execution. – This provides a powerful and high-performance way to extend the function of programs – MS Windows extensively uses DLL (Dynamic Linked Libraries)
  • 4. Introduction (Contd..)  Loader • The loader, which accepts the program form, produced by a translator & certain other program forms from a library to produce one ready – to – execute machine language program. • A unit of input to the loader is known as an object program or an object module. • The process of merging many object modules to from a single machine language program is known as linking.
  • 5. Difference between Linker and Loader • Linker is a program that takes one or more objects generated by a compiler and combines them into a single executable program. • Loader is the part of an operating system that is responsible for loading programs from executables (i.e., executable files) into memory, preparing them for execution and then executing them.
  • 6. LOADER • The loader is program, which accepts the object program , prepares this program for execution by the computer and initializes the execution. • Loader loads the referred resource or file after being Linked to referrer via a Linker during the execution of program. • In particular the loader must perform four functions: 1. Allocate space in memory for the program (allocation). 2. Resolve symbolic references between objects decks (linking). 3. Adjust all address dependent locations, such as address constants, to correspond to the allocated space (relocation). 4. Physically place the machine instructions and data into memory (loading).
  • 7. Important Terms • Translation time address: Translation time address is used at the translation time. This address is assigned by translator • Linked time address: Link time address is used at the link time. This address is assigned by linker • Load time address: Load time address is used at the load time. This address is assigned by loader • Translated origin: Address of origin assumed by the translator • Linked origin: Address of origin assumed by the linker while producing a binary program • Load origin: Address of origin assumed by the loader while loading the program for execution.
  • 8. Relocation of Linking Concept • Program relocation is the process of modifying the addresses used in the address sensitive instruction of a program such that the program can execute correctly from the designated area of memory. • If linked origin≠ translated origin, relocation must be performed by the linker. • If load origin≠ linked origin, relocation must be performed by the loader.
  • 9. Relocation of Linking Concept(Contd..) • Let AA be the set of absolute address - instruction or data addresses used in the instruction of a program P. • AA≠ ф implies that program P assumes its instructions and data to occupy memory words with specific addresses. • Such a program – called an address sensitive program – contains one or more of the following: -An address sensitive instruction: an instruction which uses an address a∈AA. -An address constant: a data word which contains an address a∈AA. • An address sensitive program P can execute correctly only if the start address of the memory area allocated to it is the same as its translated origin. • To execute correctly from any other memory area, the address used in each address sensitive instruction of P must be ‘corrected’.
  • 10. Relocation of Linking Concept(Contd..) • Performing Relocation::
  • 11. Relocation of Linking Concept(Contd..) • Performing Linking::
  • 13.
  • 15. Design of a linker
  • 16. Design of a linker (Contd..)
  • 17. Design of a linker (Contd..)
  • 21.
  • 23. Linking of Overlay Structured Programs
  • 24. Linking of Overlay Structured Programs
  • 31. Linking Loaders A linking loaders performs » All linking and relocation operations » Automatic library search » Loads the linked program directly into memory for execution A linkage editor » Produces a linked version of program (often called a load module or an executable image which is written to a file or module or an executable image), which is written to a file or library for later execution » A simple relocating loader can be used to load the linked version of program into memory version of program into memory – The loading can be accomplished in one pass with no external symbol table required