Description: The COMENT record contains a character string that may represent
a plain text comment, a symbol meaningful to a program such as LINK or LIB,
or some binary coded information that alters the linking process. The comment
records are actually a group of items, classified by "comment class".
1 byte 2 byte
ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂ---
³ 88 ³ Record ³
³ ³ Length ³
ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁ---
1 byte 1 byte <Record length - 3> 1 byte
--ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿
³Comment³Comment³ Commentary byte string ³Chk Sum³
³ Type ³ Class ³ (optional) ³or 0 ³
--ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ
COMENT record type definition
Comment Type
The comment type byte is bit-significant; layout is:
<----------------------- 1 byte ------------------------------>
ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿
³ NP ³ NL ³ 0 ³ 0 ³ 0 ³ 0 ³ 0 ³ 0 ³
ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ
where
NP
is set if the comment is to be preserved by object
bind utilities
NL
is set if the comment is not for display
by object bind utilities
Comment class and commentary byte string
The comment class is an 8-bit numeric which conveys information by its value
(accompanied by a null byte string), or indicates the information to be
found in the accompanying byte string. The byte string's length is determined
from the record length, not by an initial count byte.
The values in use currently are the following:
Translator
For translator; may name the source
language or translator. Recommended: translator name and version plus optimization
level used for compilation be recorded here. Other compiler or assembler
options can be included, although current practice seems to be to place
these under comment class 9D.
1 Intel copyright
2
through 9B Intel reserved
The values from 9C through
FF are ignored by Intel products.
9C MS-DOS version
-- obsolete
9D
Memory Model -- ignored
9E
DOSSEG
Sets the linkers DOSSEG switch. The byte
string is null. This record is included in the startup module in each language
library. It directs the linker to use the standardized segment ordering,
according to the naming conventions documented with DOS, OS/2 and accompanying
language products.
9F Library indicator
The
byte string contains a library file name (without a lead count byte and
without an extension). Can be over-ridden via NOD link switch.
A0
OMF extensions
This class consists of a set of
records, identified by subtype (first byte of commentary string). Values
supported by the OS/2 2.0 linker are
01
02
03
04 Protected Memory Library
Relevant to 32
bit DLL's. This comment record is inserted in the object module by the compiler
when it encounters a compiler option or pragma indicating a protected DLL.
The linker then sets a flag in the header of the executable file (DLL) to
indicate that the DLL should be loaded in such a way
that its shared code and data is protected from corruption.
When the flag is set in the EXE header, the loader loads the selector of
the protected memory area into the DS while performing run-time fixups (relocations).
All other DLL's and applications get the regular DGROUP selector, which
doesn't allow access to the protected memory area set up by the operating
system.
A1 Symbolic debug
information
This comment class is now used solely
to indicate the version of the symbolic debug information.
The byte string will be a version number (8-bit numeric) followed by an
ASCII character string indicating the style of symbol and line number (LINNUM)
information. Current values are
n,'C','V'
n,'D','X'
n,'H','L'
A2
Link Pass
This record conveys information to the
linker about the organization of the file. At present, a single sub-extension
is defined. The commentary string is
ÚÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄ--------ÄÄÄÄÄÄÄÄÄÄ¿ ³ 01 ³ Optional ³
ÀÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄ--------ÄÄÄÄÄÄÄÄÄÙ
Subclass 01 indicates the start of link pass 2 records; this may be followed
by anything at all, which will be ignored by the linker (determined from
the RecLength). When this comment appears, the linker can rest assured that
only LEDATA, LIDATA, FIXUPP, LINNUM and the terminal MODEND records will
occur after this. All other record types, plus THREAD fixups, occur before.
WARNING: It is assumed that this comment will not be present in a module
whose MODEND record contains a program starting address.
A4
EXESTR indicator
Executable Module Identification
String
A commentary string specifying a string to be placed in the executable module,
but which is not loaded with the load module.
A8
WKEXT
Weak Extern record. See WKEXT section for
a complete description.
AF IDMDLL indicator
Identifier
Manipulator Dynamic Link Library. See IDMDLL section for a complete description
B2H-BFH
C0H-FFH
Reserved for user-defined comment classes.
Notes:
A COMENT record can appear almost anywhere in an object module. Only two
restrictions apply:
o
A COMENT record cannot be placed between a FIXUPP
record and the LEDATA or LIDATA record to which it refers.
o
A
COMENT record can not be the first or last record in an object module. (The
first record must always be a THEADR record and the last must always be
a MODEND).
[Back: 80H THEADR Translator Header Record]
[Next: 88H EXESTR Executable String Record (comment class A4)]