Ms-Dos Linker: Dhriti Das (Roll No-07) Simsima Gogoi (Roll No-17) Tanmi Bharadwaj (Roll No-18)
Ms-Dos Linker: Dhriti Das (Roll No-07) Simsima Gogoi (Roll No-17) Tanmi Bharadwaj (Roll No-18)
Presented by:
Dhriti Das (roll no-07)
Simsima Gogoi (roll no-17)
Tanmi Bharadwaj (roll no-18)
What is MS-DOS linker?
Basically in MS-DOS compilers and assemblers object
modules are created instead of executable machine
language programs.
Binary image
External references
Public definations
Each object record contains variable length
information and may refer to the contents of previous
object records . It must appear in a specific order as
shown below-
RECORD TYPE Id (Hex) DESCRIPTION
THEADR 8O Translator header record
LNAMES 96 List of names record
SEGDEF 98 Segment defination record
EXTDEF 8C External names defination record
PUBDEF 9O Public names defination record
LEDATA AO Translated data (binary image)
FIXUPP 9C Relocation & linking information
MODEND 8A End of object module record
THEADR records
The THEADR record specifies the name of the object
module.
It is derived by the translator from the source file.
This name is used by the linker to report errors.
9CH length locat Fix Frame Target Target offset Check sum
(1) dat datum datum (1) …
(1) (1) (1)
Locat field: it contains a numeric code called loc code
to indicate the type of a fixup.
Pass 1
In the first pass, object modules are processed to collect
information concerning segments and public
definations.
Pass 2
It performs relocation and linking.
PASS 1 of LINK
Data structure used in pass 1 is Name Table (NTAB). It
has the following format-