SlideShare a Scribd company logo
INTRODUCTION TO LOADERS
C Program Building Process



                                         Compiler              Assembler
 Source              Pre-processed                  Assembly               Object code
 Program             source code                    code
           Pre-processor                                                          Linker

                                                                     Executable code




                            Process                                Program stored in
                            Address                                secondary memory
                            Space              Loader              as executable image




                           Main Memory
LOADERS

   A loader is a system software program that performs the
    loading function.

   Loading is the process of placing the program into
    memory for execution.

   Loader is responsible for initiating the execution of the
    process.
FUNDAMENTAL PROCESS OF LOADERS
   Allocation : the space for program is allocated in
    the main memory, by calculating the size of the
    program.

   Loading – brings the object program into memory
    for execution.

   Relocation – modifies the object program so that it
    can be loaded at an address different from the
    location originally specified.

   Linking, which combines two or more separate
    object programs and supplies the necessary
    information.
HOW DOES LOADER GETS LOADED   ?
ANSWER: BOOTSTRAP LOADER


 A bootstrap loader is a computer program that loads
the main operating system or runtime environment for
the computer after completion of self-tests.
TYPES OF LOADERS
 Compile and go loader
 Absolute Loader

 Relocating Loader (Relative Loader)

 Direct Linking Loader
COMPILE-AND-GO LOADER

    In compile and go loader is a link editor/program loader in
    which the assembler itself places the assembled instruction
    directly into the designated memory locations for execution.

   The instruction are read line by line, its machine code is
    obtained and it is directly put in the main memory at some
    known address.

   After completion of assembly process, it assigns the starting
    address of the program to the location counter.
   The assembler is first executed and it, when it is
    finished, causes a branch straight to the first
    instruction of the program.

   There is no stop between the compilation, link
    editing, loading, and execution of the program.

   It is also called an assemble-and-go or a load-
    and-go system.
ADVANTAGES OF COMPILE-AND-GO LOADERS

   They are simple and easier to implement.

   No additional routines are required to load the
    compiled code into the memory.
DISADVANTAGES OF COMPILE-AND-GO
LOADERS

   There is wastage in memory space due to the
    presence of the assembler.

   There is no production of .obj file, the source code
    is directly converted to executable form. Hence
    even though there is no modification in the source
    program it needs to be assembled and executed
    each time.
GENERAL LOADER SCHEME
   In “Compile-and-Go” the outputting instruction and
    data are assembled. In which assembler is placed
    in main memory that results in wastage of memory.

   To overcome that we requires the addition of the
    new program of the system, a loader.

   Generally the size of loader is less than that of
    assembler.
   The loader accepts the assembled machine instructions,
    data and other information present in the object format
    and places machine instructions and data in core in an
    executable computer form.

   The reassembly is no longer necessary to run the
    program at a later date.
ADVANTAGE OF GENERAL LOADER SCHEME


   In this scheme the source program translators produce
    compatible object program deck formats and it is possible
    to write subroutines in several different languages since
    the object decks to be processed by the loader will all be
    in the same “language” that is in “machine language”.
ABSOLUTE LOADERS
    In this scheme the assembler outputs the machine
    language translation of the source program in
    almost the same form as in the “Compile and go” ,
    except that the data is punched on cards. Here it
    will directly placed in memory .

   The loader in turn simply accepts the machine
    language text and places it into core at the location
    prescribed by the assembler.
MAIN

                  MAIN
       Absolute
        loader



SQRT              SQRT
DISADVANTAGES
   The programmer must specify to the assembler the
    address where the program is to be loaded.

   If there are multiple subroutines , the programmer must
    remember the address of each.

     The MAIN program is assigned to locations 100-247
    and the SQRT subroutine is assigned locations 400-
    477. if changes were made to MAIN that increasing
    length to more than 300 bytes.
the end of MAIN is overlap with the start of SQRT. It
would then necessary to assign SQRT to a new location
by changing its START.

There are four functions involving in the Absolute loading
           Allocation
           Linking
           Relocation
           Loading
RELOCATING LOADERS

    To avoid possible reassembling of all subroutines when a
    single subroutine is changed and to perform the tasks of
    allocation and linking for the programmer the relocating
    loaders is introduced.

   BINARY SYMBOLIC SUBROUTINE(BSS)loader such as
    used in the IBM 7094,IBM 1130,GE 635.

   The BSS loader allows many procedure segments but only
    one data (common)segment.
    The assembler assembles each procedures segment
    independently and passes to loader the text and
    information as to relocation and intersegment references.

   The output of the relocating assembler using a BSS
    scheme is the Object program and information
    about all other program its references.

   For each program the assembler outputs a
    text(machine translation of the program)
   Prefixed by Transfer Vector that consists of address
    containing names of the subroutines referenced by the
    source program.

   For ex., if a Square Root Routine(SQRT) was referenced
    and was the first subroutine called, the first location of
    transfer vector contain the symbolic name SQRT.

   The statement calling SQRT would be translated into
    transfer instruction.
   The assembler would also provide the loader with
    additional information, such as the length of the entire
    program and the length of the transfer vector.

   After loading the text and the transfer vector into core,
    the loader would load each subroutine identified in the
    transfer vector.

   Thus the execution of the call SORT statement would
    result in branch to the first location in the transfer vector.

   The BSS loader scheme is often used on computers with
    a fixed-length direct address instruction format.
   For ex, if format of 360 RX instruction were:
               8        4        4           16
          OP          R1       X2       A2
                                32


   A2-16 bit direct address

   Works for 216 memory

   If more than that then problem occurs that time the
    assembler associates a bit with instruction or address field
    that called “relocation bit.”

   If it is one , 16 bit address is relocated .

   If not, then it is not relocated.
Source program                      Rel.addr.   relocation     Rel.addr.
                                    0      00          „SORT‟
Main START
                                    4      00         „ERRb‟
    EXTRN SQRT
                                    8      01         ST 14,36
    EXTRN ERR                       12                01     L        1,40
    ST     14,SAVE save             16                01     BAL      14,0
         return address             20                01     C
                                      1,44
    L            1,F‟9‟ load test
 value
                                    24                01      BC       7,4
                                    28                01      L
    BAL         14,SQRT               14,36
 call sort
                                    32                0       BCR
    C        1,F‟3‟                   15,14
   BNE       ERR                    34                0(skipped for
   L          14,SAVE                  alignment)
   BR        14                     36                00(Temp location)
                                    40                00    9
SAVE DS      F
      temp.loc.                     44                00    3
     END
DIRECT-LINKING LOADERS

o A direct-linking loader is a relocatable loader.

o It has advantage of allowing programmer
multiple procedure segments and multiple data
segments.

o Complete freedom in referencing data or
instructions contained in other segments, provides
flexible intersegment referencing.
o The assembler should give the following information to
the loader:

   1. The length of the object code segment.

   2. A list of external symbols (could be used by other
      segments).

   3. List of External symbols(The segment is using).

   4. Information about address constants.

   5. Machine code translation of the source program.
o The list of symbols not defined in the current
segment but used in the current segment are
stored in a data structure called USE table.

o The lists of symbols defined in the current
segment and referred by the other segments are
stored in a data structure called DEFINITION
table.

o To place the object code in the memory there
are two situations:
   1. Address of the object code could be
       absolute.
   2. The address of object code can be relative.
o The assembler generates following types of cards:
                  o ESD
                  o TXT
                  o RLD
                  o END
1. ESD -
    External symbol dictionary contains information about all
    symbols that are defined in the program but referenced
    somewhere. It contains
     · Reference no
     · Symbol Name
     · TYPE
     · Relative Location
     · Length
o TYPE:
         SD - Segment Definition.
         LD - Local Definition.
         ER - External Reference.

2. TXT –
    Text card contains actual object code.(translated
    source code).

3. RLD –
     Relocation and linkage directory contains
     information about locations in the program whose
     content depend on the address at which program is
     placed.
o The RLD cards contains information:
· Location of the constant that need relocation
· By what it has to be changed
· The operation to be performed

oThe Format of RLD
      · Reference No
      · Symbol
      · Flag
      · Length
      · Relative Location

4. END –
    Indicates the end of the program and specifies
    starting address for execution
DISADVANTAGE :

 o Allocate, relocate, link, and load all the subroutines each
 time in order to execute a program.

 o Furthermore, even though loader program smaller than
 assembler, it absorb considerable amount of memory.
 Two different process of loading:

              Blinder
              Module loader

 Blinder : It binds subroutines together, output text
as a file or card deck.

 Module loader : The output file is ready to get
loaded, called load module. This module gets
physically loaded into memory.
THANK YOU

More Related Content

What's hot

Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
Rabin BK
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1Manoj Patil
 
Macro Processor
Macro ProcessorMacro Processor
Macro Processor
Saranya1702
 
Assemblers
AssemblersAssemblers
Assemblers
Dattatray Gandhmal
 
Macro assembler
 Macro assembler Macro assembler
Macro assembler
Meghaj Mallick
 
System Programming Unit II
System Programming Unit IISystem Programming Unit II
System Programming Unit IIManoj Patil
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
Andhra University
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming )
Adarsh Patel
 
Single pass assembler
Single pass assemblerSingle pass assembler
Single pass assembler
Bansari Shah
 
System software - macro expansion,nested macro calls
System software - macro expansion,nested macro callsSystem software - macro expansion,nested macro calls
System software - macro expansion,nested macro calls
SARASWATHI S
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
desta_gebre
 
Input output organization
Input output organizationInput output organization
Input output organizationabdulugc
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
PreethiSureshkumar1
 
Dma transfer
Dma transferDma transfer
Dma transfergmnithya
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
Sadaf Rasheed
 
Language processing activity
Language processing activityLanguage processing activity
Language processing activity
Dhruv Sabalpara
 
Computer registers
Computer registersComputer registers
Computer registers
DeepikaT13
 
Code generation
Code generationCode generation
Code generation
Aparna Nayak
 
Macro-processor
Macro-processorMacro-processor
Macro-processor
Temesgen Molla
 
Ch 4 linker loader
Ch 4 linker loaderCh 4 linker loader
Ch 4 linker loader
Malek Sumaiya
 

What's hot (20)

Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
 
Macro Processor
Macro ProcessorMacro Processor
Macro Processor
 
Assemblers
AssemblersAssemblers
Assemblers
 
Macro assembler
 Macro assembler Macro assembler
Macro assembler
 
System Programming Unit II
System Programming Unit IISystem Programming Unit II
System Programming Unit II
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming )
 
Single pass assembler
Single pass assemblerSingle pass assembler
Single pass assembler
 
System software - macro expansion,nested macro calls
System software - macro expansion,nested macro callsSystem software - macro expansion,nested macro calls
System software - macro expansion,nested macro calls
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
 
Input output organization
Input output organizationInput output organization
Input output organization
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Dma transfer
Dma transferDma transfer
Dma transfer
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Language processing activity
Language processing activityLanguage processing activity
Language processing activity
 
Computer registers
Computer registersComputer registers
Computer registers
 
Code generation
Code generationCode generation
Code generation
 
Macro-processor
Macro-processorMacro-processor
Macro-processor
 
Ch 4 linker loader
Ch 4 linker loaderCh 4 linker loader
Ch 4 linker loader
 

Viewers also liked

Loader and Its types
Loader and Its typesLoader and Its types
Loader and Its types
Parth Dodiya
 
30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-ppt30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-ppt
raj732723
 
Computer organization memory hierarchy
Computer organization memory hierarchyComputer organization memory hierarchy
Computer organization memory hierarchy
AJAL A J
 
Windows 98
Windows 98Windows 98
Windows 98
School/ NFA Office
 
Bios ( Basic Input Output System )
Bios ( Basic Input Output System )Bios ( Basic Input Output System )
Bios ( Basic Input Output System )
Jesthine Nesshal
 
Ports and connectors
Ports and connectorsPorts and connectors
Ports and connectors
chrispaul8676
 

Viewers also liked (7)

Loader and Its types
Loader and Its typesLoader and Its types
Loader and Its types
 
Memory hierarchy
Memory hierarchyMemory hierarchy
Memory hierarchy
 
30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-ppt30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-ppt
 
Computer organization memory hierarchy
Computer organization memory hierarchyComputer organization memory hierarchy
Computer organization memory hierarchy
 
Windows 98
Windows 98Windows 98
Windows 98
 
Bios ( Basic Input Output System )
Bios ( Basic Input Output System )Bios ( Basic Input Output System )
Bios ( Basic Input Output System )
 
Ports and connectors
Ports and connectorsPorts and connectors
Ports and connectors
 

Similar to Introduction to loaders

Loader
LoaderLoader
ARM Embeded_Firmware.pdf
ARM Embeded_Firmware.pdfARM Embeded_Firmware.pdf
ARM Embeded_Firmware.pdf
hakilic1
 
module 4.docx
module 4.docxmodule 4.docx
module 4.docx
GOKULDEV20
 
Assembler design option
Assembler design optionAssembler design option
Assembler design optionMohd Arif
 
loaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggyloaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggy
rahulyadav957181
 
Module-4 Program Design and Anyalysis.pdf
Module-4 Program Design and Anyalysis.pdfModule-4 Program Design and Anyalysis.pdf
Module-4 Program Design and Anyalysis.pdf
Sitamarhi Institute of Technology
 
Chapter 3 programming concepts-ii
Chapter 3  programming concepts-iiChapter 3  programming concepts-ii
Chapter 3 programming concepts-ii
SHREEHARI WADAWADAGI
 
assembler_full_slides.ppt
assembler_full_slides.pptassembler_full_slides.ppt
assembler_full_slides.ppt
Ashwini864432
 
loader.ppt
loader.pptloader.ppt
Assembly level language
Assembly level languageAssembly level language
Assembly level language
PDFSHARE
 
Examinable Question and answer system programming
Examinable Question and answer system programmingExaminable Question and answer system programming
Examinable Question and answer system programming
Makerere university
 
Embedded C programming session10
Embedded C programming  session10Embedded C programming  session10
Embedded C programming session10
Keroles karam khalil
 
C programming session10
C programming  session10C programming  session10
C programming session10
Keroles karam khalil
 
Org-&-Arch-2.ppt
Org-&-Arch-2.pptOrg-&-Arch-2.ppt
Org-&-Arch-2.ppt
MahmoudNazzal7
 
Os7 2
Os7 2Os7 2
Os7 2issbp
 
Virtualization summary b.docx
Virtualization summary b.docxVirtualization summary b.docx
Virtualization summary b.docx
shruti533256
 

Similar to Introduction to loaders (20)

Loaders
LoadersLoaders
Loaders
 
Loader
LoaderLoader
Loader
 
ARM Embeded_Firmware.pdf
ARM Embeded_Firmware.pdfARM Embeded_Firmware.pdf
ARM Embeded_Firmware.pdf
 
module 4.docx
module 4.docxmodule 4.docx
module 4.docx
 
05linkers
05linkers05linkers
05linkers
 
Assembler
AssemblerAssembler
Assembler
 
Assembler design option
Assembler design optionAssembler design option
Assembler design option
 
Assembler
AssemblerAssembler
Assembler
 
loaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggyloaders-and-linkers.pdfhhhhhccftyghgfggy
loaders-and-linkers.pdfhhhhhccftyghgfggy
 
Module-4 Program Design and Anyalysis.pdf
Module-4 Program Design and Anyalysis.pdfModule-4 Program Design and Anyalysis.pdf
Module-4 Program Design and Anyalysis.pdf
 
Chapter 3 programming concepts-ii
Chapter 3  programming concepts-iiChapter 3  programming concepts-ii
Chapter 3 programming concepts-ii
 
assembler_full_slides.ppt
assembler_full_slides.pptassembler_full_slides.ppt
assembler_full_slides.ppt
 
loader.ppt
loader.pptloader.ppt
loader.ppt
 
Assembly level language
Assembly level languageAssembly level language
Assembly level language
 
Examinable Question and answer system programming
Examinable Question and answer system programmingExaminable Question and answer system programming
Examinable Question and answer system programming
 
Embedded C programming session10
Embedded C programming  session10Embedded C programming  session10
Embedded C programming session10
 
C programming session10
C programming  session10C programming  session10
C programming session10
 
Org-&-Arch-2.ppt
Org-&-Arch-2.pptOrg-&-Arch-2.ppt
Org-&-Arch-2.ppt
 
Os7 2
Os7 2Os7 2
Os7 2
 
Virtualization summary b.docx
Virtualization summary b.docxVirtualization summary b.docx
Virtualization summary b.docx
 

More from Tech_MX

Virtual base class
Virtual base classVirtual base class
Virtual base classTech_MX
 
Theory of estimation
Theory of estimationTheory of estimation
Theory of estimationTech_MX
 
Templates in C++
Templates in C++Templates in C++
Templates in C++Tech_MX
 
String & its application
String & its applicationString & its application
String & its applicationTech_MX
 
Statistical quality__control_2
Statistical  quality__control_2Statistical  quality__control_2
Statistical quality__control_2Tech_MX
 
Stack data structure
Stack data structureStack data structure
Stack data structureTech_MX
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application Tech_MX
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applicationsTech_MX
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2Tech_MX
 
Set data structure
Set data structure Set data structure
Set data structure Tech_MX
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
 
Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Tech_MX
 
Motherboard of a pc
Motherboard of a pcMotherboard of a pc
Motherboard of a pcTech_MX
 
More on Lex
More on LexMore on Lex
More on LexTech_MX
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbmsTech_MX
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)Tech_MX
 
Memory dbms
Memory dbmsMemory dbms
Memory dbmsTech_MX
 

More from Tech_MX (20)

Virtual base class
Virtual base classVirtual base class
Virtual base class
 
Uid
UidUid
Uid
 
Theory of estimation
Theory of estimationTheory of estimation
Theory of estimation
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
 
String & its application
String & its applicationString & its application
String & its application
 
Statistical quality__control_2
Statistical  quality__control_2Statistical  quality__control_2
Statistical quality__control_2
 
Stack data structure
Stack data structureStack data structure
Stack data structure
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
 
Spss
SpssSpss
Spss
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applications
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2
 
Set data structure
Set data structure Set data structure
Set data structure
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
Parsing
ParsingParsing
Parsing
 
Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)
 
Motherboard of a pc
Motherboard of a pcMotherboard of a pc
Motherboard of a pc
 
More on Lex
More on LexMore on Lex
More on Lex
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbms
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)
 
Memory dbms
Memory dbmsMemory dbms
Memory dbms
 

Recently uploaded

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

Introduction to loaders

  • 2. C Program Building Process Compiler Assembler Source Pre-processed Assembly Object code Program source code code Pre-processor Linker Executable code Process Program stored in Address secondary memory Space Loader as executable image Main Memory
  • 3. LOADERS  A loader is a system software program that performs the loading function.  Loading is the process of placing the program into memory for execution.  Loader is responsible for initiating the execution of the process.
  • 4. FUNDAMENTAL PROCESS OF LOADERS  Allocation : the space for program is allocated in the main memory, by calculating the size of the program.  Loading – brings the object program into memory for execution.  Relocation – modifies the object program so that it can be loaded at an address different from the location originally specified.  Linking, which combines two or more separate object programs and supplies the necessary information.
  • 5. HOW DOES LOADER GETS LOADED ?
  • 6. ANSWER: BOOTSTRAP LOADER A bootstrap loader is a computer program that loads the main operating system or runtime environment for the computer after completion of self-tests.
  • 7. TYPES OF LOADERS  Compile and go loader  Absolute Loader  Relocating Loader (Relative Loader)  Direct Linking Loader
  • 8. COMPILE-AND-GO LOADER  In compile and go loader is a link editor/program loader in which the assembler itself places the assembled instruction directly into the designated memory locations for execution.  The instruction are read line by line, its machine code is obtained and it is directly put in the main memory at some known address.  After completion of assembly process, it assigns the starting address of the program to the location counter.
  • 9. The assembler is first executed and it, when it is finished, causes a branch straight to the first instruction of the program.  There is no stop between the compilation, link editing, loading, and execution of the program.  It is also called an assemble-and-go or a load- and-go system.
  • 10. ADVANTAGES OF COMPILE-AND-GO LOADERS  They are simple and easier to implement.  No additional routines are required to load the compiled code into the memory.
  • 11. DISADVANTAGES OF COMPILE-AND-GO LOADERS  There is wastage in memory space due to the presence of the assembler.  There is no production of .obj file, the source code is directly converted to executable form. Hence even though there is no modification in the source program it needs to be assembled and executed each time.
  • 12. GENERAL LOADER SCHEME  In “Compile-and-Go” the outputting instruction and data are assembled. In which assembler is placed in main memory that results in wastage of memory.  To overcome that we requires the addition of the new program of the system, a loader.  Generally the size of loader is less than that of assembler.
  • 13. The loader accepts the assembled machine instructions, data and other information present in the object format and places machine instructions and data in core in an executable computer form.  The reassembly is no longer necessary to run the program at a later date.
  • 14. ADVANTAGE OF GENERAL LOADER SCHEME  In this scheme the source program translators produce compatible object program deck formats and it is possible to write subroutines in several different languages since the object decks to be processed by the loader will all be in the same “language” that is in “machine language”.
  • 15. ABSOLUTE LOADERS  In this scheme the assembler outputs the machine language translation of the source program in almost the same form as in the “Compile and go” , except that the data is punched on cards. Here it will directly placed in memory .  The loader in turn simply accepts the machine language text and places it into core at the location prescribed by the assembler.
  • 16. MAIN MAIN Absolute loader SQRT SQRT
  • 17. DISADVANTAGES  The programmer must specify to the assembler the address where the program is to be loaded.  If there are multiple subroutines , the programmer must remember the address of each.  The MAIN program is assigned to locations 100-247 and the SQRT subroutine is assigned locations 400- 477. if changes were made to MAIN that increasing length to more than 300 bytes.
  • 18. the end of MAIN is overlap with the start of SQRT. It would then necessary to assign SQRT to a new location by changing its START. There are four functions involving in the Absolute loading Allocation Linking Relocation Loading
  • 19. RELOCATING LOADERS  To avoid possible reassembling of all subroutines when a single subroutine is changed and to perform the tasks of allocation and linking for the programmer the relocating loaders is introduced.  BINARY SYMBOLIC SUBROUTINE(BSS)loader such as used in the IBM 7094,IBM 1130,GE 635.  The BSS loader allows many procedure segments but only one data (common)segment.
  • 20. The assembler assembles each procedures segment independently and passes to loader the text and information as to relocation and intersegment references.  The output of the relocating assembler using a BSS scheme is the Object program and information about all other program its references.  For each program the assembler outputs a text(machine translation of the program)
  • 21. Prefixed by Transfer Vector that consists of address containing names of the subroutines referenced by the source program.  For ex., if a Square Root Routine(SQRT) was referenced and was the first subroutine called, the first location of transfer vector contain the symbolic name SQRT.  The statement calling SQRT would be translated into transfer instruction.
  • 22. The assembler would also provide the loader with additional information, such as the length of the entire program and the length of the transfer vector.  After loading the text and the transfer vector into core, the loader would load each subroutine identified in the transfer vector.  Thus the execution of the call SORT statement would result in branch to the first location in the transfer vector.  The BSS loader scheme is often used on computers with a fixed-length direct address instruction format.
  • 23. For ex, if format of 360 RX instruction were: 8 4 4 16 OP R1 X2 A2 32  A2-16 bit direct address  Works for 216 memory  If more than that then problem occurs that time the assembler associates a bit with instruction or address field that called “relocation bit.”  If it is one , 16 bit address is relocated .  If not, then it is not relocated.
  • 24. Source program Rel.addr. relocation Rel.addr. 0 00 „SORT‟ Main START 4 00 „ERRb‟ EXTRN SQRT 8 01 ST 14,36 EXTRN ERR 12 01 L 1,40 ST 14,SAVE save 16 01 BAL 14,0 return address 20 01 C 1,44 L 1,F‟9‟ load test value 24 01 BC 7,4 28 01 L BAL 14,SQRT 14,36 call sort 32 0 BCR C 1,F‟3‟ 15,14 BNE ERR 34 0(skipped for L 14,SAVE alignment) BR 14 36 00(Temp location) 40 00 9 SAVE DS F temp.loc. 44 00 3 END
  • 25. DIRECT-LINKING LOADERS o A direct-linking loader is a relocatable loader. o It has advantage of allowing programmer multiple procedure segments and multiple data segments. o Complete freedom in referencing data or instructions contained in other segments, provides flexible intersegment referencing.
  • 26. o The assembler should give the following information to the loader: 1. The length of the object code segment. 2. A list of external symbols (could be used by other segments). 3. List of External symbols(The segment is using). 4. Information about address constants. 5. Machine code translation of the source program.
  • 27. o The list of symbols not defined in the current segment but used in the current segment are stored in a data structure called USE table. o The lists of symbols defined in the current segment and referred by the other segments are stored in a data structure called DEFINITION table. o To place the object code in the memory there are two situations: 1. Address of the object code could be absolute. 2. The address of object code can be relative.
  • 28. o The assembler generates following types of cards: o ESD o TXT o RLD o END 1. ESD - External symbol dictionary contains information about all symbols that are defined in the program but referenced somewhere. It contains · Reference no · Symbol Name · TYPE · Relative Location · Length
  • 29. o TYPE: SD - Segment Definition. LD - Local Definition. ER - External Reference. 2. TXT – Text card contains actual object code.(translated source code). 3. RLD – Relocation and linkage directory contains information about locations in the program whose content depend on the address at which program is placed.
  • 30. o The RLD cards contains information: · Location of the constant that need relocation · By what it has to be changed · The operation to be performed oThe Format of RLD · Reference No · Symbol · Flag · Length · Relative Location 4. END – Indicates the end of the program and specifies starting address for execution
  • 31. DISADVANTAGE : o Allocate, relocate, link, and load all the subroutines each time in order to execute a program. o Furthermore, even though loader program smaller than assembler, it absorb considerable amount of memory.
  • 32.  Two different process of loading:  Blinder  Module loader  Blinder : It binds subroutines together, output text as a file or card deck.  Module loader : The output file is ready to get loaded, called load module. This module gets physically loaded into memory.