HP OpenVMS Systems Documentation |
OpenVMS Linker Utility Manual
B.3.1.2 Program-Section-Definition-in-Shareable-Image Subrecord (GSD$C_SPSC, EGSD$C_SPSC64)This subrecord is reserved to the linker. It is generated in the GST when a program section is made universal with the SYMBOL_VECTOR keyword PSECT. When a main image links against a shareable image that contains these special universal program sections, the linker matches program sections from the main image to those in the shareable image and overlays them. The overlay is done only if the program sections have the same name, the attributes EGSY$V_OVR, EGSY$V_REL, and EGSY$V_GBL, and the same allocation. References to the program section in the main image are fixed up and thereby converted to references to the corresponding program section in the shareable image. Shareable program sections have indexes, but are never referenced by symbol definitions. All symbol definitions in the GST point to an absolute program section, regardless of whether they are relocatable, that is, regardless of whether the EGSY$V_REL bit is set or clear. Figure B-4 depicts the format of a definition subrecord, followed by a short description of each field. The EGSD$C_SPSC64 subrecord differs from GSD$C_SPSC only in that the image offset of the psect is a quadword rather than a longword. It has the same format shown in Figure B-4, with the name prefix ESGPS64$ rather than ESGPS$. EGSD$C_SPSC64 is used only if the offset is too large to fit in the 32-bit ESGPS$L_BASE field, and ESGPS64$Q_BASE must be used instead. Figure B-4 GSD Subrecord for a Shareable Image Program Section Definition
GSD type is EGSD$C_SPSC.
This field contains the size of the entire subrecord, including the preceding type field and any padding used to quadword-align the following record.
This field specifies the virtual address boundary at which the program section is placed. The alignment for the entire program section is the largest one specified by any of its contributions. Valid values for this field are 0 to 16.
Field alignment byte. Must be 0.
This field is a word-length bit field, each bit indicating (when set) that the program section has the corresponding attribute. The next table lists the numbers, names, and corresponding meanings of each bit in the field.
This field contains the length in bytes of this module's contribution to the program section. The value is always nonzero.
This field contains a copy of the low-order longword of the second half of the symbol vector entry. It is the image offset of the program section. In EGSD$C_SPSC64 records, the base field ESGPS64$Q_BASE is 8 bytes in length.
This field contains the offset into the symbol vector of an entry for this program section.
This field contains the length in bytes of the program section name.
This field contains the name of the program section in ASCII format.
Table B-7 describes the standard program section names and attributes used by the Alpha compilers provided by Compaq.
B.3.2 Global Symbol Specification Subrecords (EGSD$C_SYM, EGSD$C_SYMG)The global symbol specification subrecords are used to describe the nature of a symbol (global or universal, relocatable or absolute) and how it is being used (definition or reference, weak or strong). This information is specified in the FLAGS field of the subrecord. Unlike the GSD$C_SYM record on VAX systems, this record type is also used to define procedures (by setting the EGSY$V_NORM bit in the FLAGS field). There is no Alpha object language equivalent to the GSD$C_EPM record type, which is used on VAX systems to define an entry point mask for a global procedure. There are two formats for a global symbol specification subrecord: one for a symbol definition and one for a symbol reference. A symbol definition is indicated when the EGSY$V_DEF bit in the FLAGS field is set. A symbol reference is indicated when the EGSY$V_DEF bit is clear.
Section B.3.2.1 describes the format of the global symbol specification
subrecord for symbol definitions; Section B.3.2.3 does the same for
symbol references.
Figure B-5 depicts a global symbol specification subrecord that defines data. Figure B-6 depicts a global symbol specification that defines a procedure. The structures of each of these definitions are identical and have the same names, but some of the fields are interpreted differently based on the setting of the EGSY$V_NORM bit in the EGSY$W_FLAGS field. The Alpha object language does not have a separate subrecord type for procedures (for example, the VAX entry-point-symbol-and-mask-definition [GSD$C_EPM] subrecord). Figure B-5 GSD Subrecord for a Global Symbol Definition (Data) Figure B-6 GSD Subrecord for a Global Symbol Definition (Procedure) The following is a list of the fields in a global symbol definition subrecord. Fields that have different meanings depending on the value of the FLAGS field are noted.
This field redefines EGSY$W_GSDSIZ. GSD type is EGSD$C_SYM.
This field redefines EGSY$W_GSDSIZ. It is the size of the entire subrecord, including the preceding type field and any padding used to quadword align the following record.
This field redefines EGSY$B_DATYP. It contains the data type of the global symbol. The linker currently ignores this field.
This field redefines EGSY$B_TEMP. Alignment field must be 0.
This field redefines EGSY$W_FLAGS. It is a 2-byte bit field, but only bits 0 through 6 are used. The following table lists the numbers, names, and meanings of each bit in the field:
This field contains the value assigned to the symbol by the language processor. If the EGSY$V_NORM bit is set, the value of this field is the offset into the program section (indicated in ESDF$L_PSINDX) of the procedure descriptor.
If the EGSY$V_NORM bit is set, the value in this field is the offset into the program section (indicated by ESDF$L_CA_PSINDX) of the entry point of the procedure. If the EGSY$V_NORM bit is clear, this field must be 0.
If the EGSY$V_NORM bit is set, the value in this field contains the program section index of the program section that contains the code address. If the EGSY$V_NORM bit is clear, this field must be 0.
This field contains the program section index, described in Section B.3.1. If EGSY$V_REL is set, the value in this field identifies a relocatable program section (one with EGPS$V_REL set) that contains the storage for the data or procedure descriptor. If the EGSY$V_REL bit is clear (the symbol is a constant), the PSECT INDEX must point to an absolute program section (one with EGPS$V_REL clear).
This field contains the length in bytes of the symbol name.
This field contains the symbol name in ASCII format.
This record is reserved for use by the linker. It is used solely in global symbol tables in shareable images and global symbol table files (.STB) generated by the linker. This record type is not used in compiler-generated symbol table files. Figure B-7 depicts the universal symbol specification subrecord for a data definition. Figure B-7 GSD Subrecords for Universal Data Definition Figure B-8 depicts the universal symbol specification subrecord for a procedure definition. Figure B-8 GSD Subrecord for a Universal Procedure Definition The following is a list of the fields in a universal symbol definition subrecord.
This field redefines EGSY$W_GSDTYP. The GSD type is EGSD$C_SYMG.
This field redefines EGSY$W_GSDSIZ. It is the size of the entire subrecord, including the preceding type field and any padding used to quadword align the following record.
This field redefines EGSY$B_DATYP. Reserved, must be 0.
This field redefines EGSY$B_TEMP. Used for alignment, must be 0.
This field redefines EGSY$W_FLAGS. It is a 2-byte bit field, whose bits describe the universal symbol.
This field contains the offset into the symbol vector of the symbol vector entry for this symbol. If the symbol is a constant, the VALUE field still contains an offset into the symbol vector; the constant value resides in the symbol vector itself. External references to a constant symbol will receive fix-ups. Unlike VAX systems, there are no link-time constants on Alpha systems.
This field contains the low-order 32 bits of the first quadword of the symbol's entry in the symbol vector. If the EGSY$V_NORM bit is set, this is the offset into the image of the procedure entry point. Otherwise, this field contains zeros.
This field contains the low-order 32 bits of the second quadword of the symbol's entry in the symbol vector. If the EGSY$V_REL bit is clear, the symbol is a constant and this field contains the constant value. If EGSY$V_REL bit is set and the EGSY$V_NORM bit is clear, this field contains the image offset of data. When the EGSY$V_NORM bit is set, the GSD subrecord defines a procedure and the field contains the image offset of a procedure descriptor.
This must be the index of an absolute psect. Normally there is only one absolute psect, named ".$$ABS$$.", and its index is 0.
This field contains the length in bytes of the symbol name.
This field contains the symbol name in ASCII format.
|