With an algorithm, explain pass1 of a linking loader


Pass 1:

Begin

get PROOADDR from operating system

set CSADDR to PROOADDR {for first control section}

while not end of input do

begin

read next input record {Header record for control section}

set CSLTH to control section length

search ESTAB for control section name

if found then

set error flag {duplicate external symbol}

else

enter control section name into ESTAB with value CSADDR

while record type ~ 'E' do

begin

read next input record

if record type = 'D' then

for each symbol in the record do

begin

search ESTAB for symbol name

if found then

set error flag (duplicate external symbol)

else

enter symbol into ESTAB with value(CSADDR + indicated address)

end {for}

end {while ~ 'E'}

add CSLTH to CSADDR {starting address for next control section}

end {while not EOF}

end {Pass 1}



Share to whatsapp

More Questions from System Software and Compiler Design Module 2

Difference Between Linking Loader vs Linkage Editor
View
The linkage editor
View
Input Buffering in Compiler Design
View
How object program can be processed using linkage editor?
View
Structure of a Compiler Design - Phases of Compiler
View
What is dynamic linking? explain the process of loading and calling a subroutine using dynamic linking
View
Write note on MASM assembler
View