HP OpenVMS Systems Documentation |
OpenVMS Linker Utility Manual
SYMBOL_VECTOR= (Alpha Only)
For Alpha linking, declares universal symbols in shareable images. FormatSYMBOL_VECTOR=([alias-name/]symbol-name=symbol-vector-entry-type) Option Values
1You can specify an alias name for this type of symbol vector entry. DescriptionThe linker creates an entry in the global symbol table (GST) of a shareable image for each symbol listed in the SYMBOL_VECTOR= option, unless the symbol is declared private, the /NOGST qualifier is specified, or the symbol is the internal name for an alias. Symbols that appear in the GST of a shareable image are available for external modules to link against. For more information about creating and using shareable Alpha images, see Chapter 4. Example
UNIVERSAL= (VAX Only)
For VAX linking, declares a symbol in a shareable image as universal, causing the linker to include it in the global symbol table of a shareable image. FormatUNIVERSAL= symbol-name[,...] Option Values
DescriptionThis option may be specified only in the creation of a shareable image. Example
Appendix A
|
Record Type | Symbol | Code |
---|---|---|
Header (HDR) | OBJ$C_HDR | 0 |
Global symbol directory (GSD) | OBJ$C_GSD | 1 |
Text information and relocation (TIR) | OBJ$C_TIR | 2 |
End-of-module (EOM) | OBJ$C_EOM | 3 |
Debugger information (DBG) | OBJ$C_DBG | 4 |
Traceback information (TBT) | OBJ$C_TBT | 5 |
Link option specification (LNK) | OBJ$C_LNK | 6 |
End-of-module-with-word-psect (EOMW) | OBJ$C_EOMW | 7 |
Reserved for Compaq use | 8--100 | |
Reserved always | 101--200 | |
Reserved for customer use | 201--255 |
Reserved indicates that the item must not be present because it is reserved for possible future use by the linker and Compaq. The linker produces an error if a reserved item is found in an object module.
All legal record types need not appear in a single object module. However, each object module must contain the following:
An object module may contain any number of GSD, TIR, DBG, and TBT records, in any order, as long as they are not first or last in the object module. Figure A-1 depicts the correct ordering of records within an object module.
Figure A-1 Order of Records in an Object Module
If a field is currently ignored by the linker, you must still allocate space for it, filling it with zeros to its entire specified length.
Records in the object language may contain the names of program sections, object modules, language processors, utilities, and so on. Two methods of specifying names are implemented in the VAX object language:
All name strings except the names specified in header records may be up to 31 characters long.
The following sections contain diagrams of the VAX records and subrecords. Each record or subrecord contains several fields. The left-hand column of a diagram gives, for each field, its name, symbolic representation, and length in bytes. The right-hand column gives the value (which may be a symbolic name), where appropriate, and a description of the field.
Note that many records contain identical fields; if the right-hand column of a diagram does not give a description of a field, that field has already been described in a previous record.
Also note that corresponding numerical codes for record types,
subrecord types (in HDR and GSD records), and TIR commands are defined
and are given in this section. Though these may be substituted for the
symbolic name of the record or subrecord in the appropriate field, this
practice is not recommended.
A.2 Header Records
The object language currently provides for the definition of six types of header records. Of the remaining possible types, types 7 to 100 are reserved for use by Compaq, and types 101 to 255 are ignored.
The following table lists the various types of header records. Column 1 lists the name of the header type, followed by its abbreviation. Column 2 lists the related symbolic representations and column 3 lists the corresponding numerical codes.
Header Type | Symbol | Code |
---|---|---|
Main module header (MHD) 1 | MHD$C_MHD | 0 |
Language processor name header (LNM) 1 | MHD$C_LNM | 1 |
Source file header (SRC) 2 | MHD$C_SRC | 2 |
Title text header (TTL) 2 | MHD$C_TTL | 3 |
Copyright header (CPR) 2 | MHD$C_CPR | 4 |
Maintenance status header (MTC) 2 | MHD$C_MTC | 5 |
General text header (GTX) 2 | MHD$C_GTX | 6 |
Reserved | 7--100 | |
Ignored | 101--255 |
The content and format of the MHD and LNM header types, both of which are required in each object module, are described in the following subsections.
Though currently ignored by the linker, the header types SRC, TTL, CPR, MTC, and GTX exist to allow the language processors to provide printable information within the object module for documentation purposes. The format of the SRC, TTL, CPR, MTC, and GTX records consists of a record type field, header type field, and a field containing the ASCII text.
The content and format of the SRC and TTL records are depicted in
Section A.2.3 and Section A.2.4. The contents of these records, as well
as the MTC record (which contains information about the maintenance
status of the object module), are displayed in an object module
analysis. (See the description of the ANALYZE/OBJECT command in the
OpenVMS DCL Dictionary.)
A.2.1 Main Module Header Record (MHD$C_MHD)
The following presents the name, symbolic representation, and length of each field in the main module header record. The listing includes a symbolic value or an explanation of the contents of the field, where appropriate.
RECORD TYPE | Name: MHD$B_RECTYP |
Length: 1 byte |
The record type is OBJ$C_HDR.
HEADER TYPE | Name: MHD$B_HDRTYP |
Length: 1 byte |
The header type is MHD$C_MHD.
STRUCTURE LEVEL | Name: MHD$B_STRLVL |
Length: 1 byte |
The structure level is OBJ$C_STRLVL. Because the format of the MHD record never changes, the structure level field is provided so that changes in the format of other records can be made without recompiling every module that conformed to the previous format.
MAXIMUM RECORD SIZE | Name: MHD$W_RECSIZ |
Length: 2 bytes |
The maximum record size is OBJ$C_MAXRECSIZ, which is limited to 2048 bytes. This field contains the size in bytes of the longest record that can occur in the object module.
MODULE NAME LENGTH | Name: MHD$B_NAMLNG |
Length: 1 byte |
This field contains the length in characters of the module name.
MODULE NAME | Name: MHD$T_NAME |
Length: variable, 1 to 31 bytes for object modules, 1 to 39 bytes for the module header at the beginning of a shareable image symbol table |
This field contains the module name in ASCII format.
MODULE VERSION | Name: None |
Length: variable, 2 to 32 bytes |
This field contains the module version number in standard name format.
CREATION TIME AND DATE | Name: None |
Length: 17 bytes |
This field contains the module creation time and date in the fixed format dd-mmm-yyyy hh:mm, where dd is the day of the month, mmm is the standard 3-character abbreviation of the month, yyyy is the year, hh is the hour (00 to 23), and mm is the minutes of the hour (00 to 59). Note that a space is required after the year and that the total character count for this time format is 17 characters (including hyphens (-), the space, and the colon (:)).
TIME AND DATE OF LAST PATCH | Name: None |
Length: 17 bytes |
This field is currently ignored by the linker and should be padded with
17 zeros.
A.2.2 Language Processor Name Header Record (MHD$C_LNM)
The following presents the name, symbolic representation, and length of each field in the language processor name header record. The listing includes a symbolic value or an explanation of the contents of the field, where appropriate.
RECORD TYPE | Name: MHD$B_RECTYP |
Length: 1 byte |
The record type is OBJ$C_HDR.
HEADER TYPE | Name: MHD$B_HDRTYP |
Length: 1 byte |
The header type is MHD$C_LNM.
LANGUAGE NAME | Name: None |
Length: variable |
This field, which is generated by the language processor, contains the
name and version of the source language that the language processor
translates into the object language. It consists of a variable-length
string of ASCII characters and is not preceded by a byte count of the
string.
A.2.3 Source Files Header Record (MHD$C_SRC)
The following presents the name, symbolic representation, and length of each field in the source files header record. The listing includes a symbolic value or an explanation of the contents of the field, where appropriate. The contents of this record, though ignored by the linker, are displayed in an object module analysis. (See the description of the ANALYZE/OBJECT command in the OpenVMS DCL Dictionary.)
RECORD TYPE | Name: MHD$B_RECTYP |
Length: 1 byte |
The record type is OBJ$C_HDR.
HEADER TYPE | Name: MHD$B_HDRTYP |
Length: 1 byte |
The header type is MHD$C_SRC.
SOURCE FILES | Name: None |
Length: variable |
This field, which is generated by the language processor, contains the
list of file specifications from which the object module was created.
It consists of a variable-length string of ASCII characters and is not
preceded by a byte count of the string.
A.2.4 Title Text Header Record (MHD$C_TTL)
The following presents the name, symbolic representation, and length of each field in the title text header record. The listing includes a symbolic value or an explanation of the contents of the field, where appropriate. The contents of this record, though ignored by the linker, are displayed in an object module analysis. (See the description of the ANALYZE/OBJECT command in the OpenVMS DCL Dictionary.)
RECORD TYPE | Name: MHD$B_RECTYP |
Length: 1 byte |
The record type is OBJ$C_HDR.
HEADER TYPE | Name: MHD$B_HDRTYP |
Length: 1 byte |
The header type is MHD$C_TTL.
TITLE TEXT | Name: None |
Length: variable |
This field, which is generated by the language processor, contains a
brief description of the object module. It consists of a
variable-length string of ASCII characters and is not preceded by a
byte count of the string.
A.3 Global Symbol Directory Records
GSD records contain information that the linker uses to build the global symbol table and the program section table. Using this information, the linker allocates virtual address space and combines program sections into image sections.
At least one GSD record must appear in an object module.
The first field in a GSD record is the record type GSD$B_RECTYP, whose value is OBJ$C_GSD. Subsequent fields describe one or more GSD subrecords, each of which begins with the GSD type field GSD$B_GSDTYP.
Table A-1 lists each type of GSD subrecord together with its symbolic representation and its corresponding numerical code.
GSD Subrecord | Symbol | Code |
---|---|---|
Program section definition | GSD$C_PSC | 0 |
Global symbol specification | GSD$C_SYM | 1 |
Entry point symbol and mask definition | GSD$C_EPM | 2 |
Procedure with formal argument definition | GSD$C_PRO | 3 |
Symbol definition with word psect | GSD$C_SYMW | 4 |
Entry point definition with word psect | GSD$C_EPMW | 5 |
Procedure definition with word psect | GSD$C_PROW | 6 |
Entity ident consistency check | GSD$C_IDC | 7 |
Environment definition/reference | GSD$C_ENV | 8 |
Module-local symbol definition/reference | GSD$C_LSY | 9 |
Module-local entry point definition | GSD$C_LEPM | 10 |
Module-local procedure definition | GSD$C_LPRO | 11 |
Program section definition in a
shareable image |
GSD$C_SPSC | 12 |
Again, a single GSD record may contain one or more of the above types of subrecords. Figure A-2 displays the general format of a GSD record that contains multiple subrecords. Column 1 displays the field names; column 2 displays possible values for those fields. Note that the RECORD TYPE field appears only once at the beginning. Each subrecord begins with the GSD TYPE field.
Figure A-2 GSD Record with Multiple Subrecords
The following subsections describe the format and content of each GSD subrecord. For each subrecord, the name, length, value, and description of each field are given, where appropriate.
Note that the RECORD TYPE field is not listed with the GSD subrecords. Remember that this field must always appear first in the GSD record and that it appears only once, regardless of how many GSD subrecords are included in the GSD record.
Previous | Next | Contents | Index |