LIBVEC descriptor (LVD)

The LVD provides the entry point names and attributes of routines accessed through the LIBVEC. It also provides information about LIBPACKs associated with the LIBVEC. The LVD is provided by the LIBVEC owner. An LVD consists of 3 sections; its format Figure 1 shows the format:
  • Header information
  • LIBPACK information
  • LIBVEC information
Figure 1. LIBVEC descriptor
  CEEPLVD   CSECT                     LIBVEC descriptor
  CEEPLVD   AMODE ANY
  CEEPLVD   RMODE ANY                 Can reside anywhere in storage
  ********************************************************************
  *  Header Information Section                                      *
  ********************************************************************
           DC    CL4'LVD '           Eyecatcher
           DC    HL2'n'              Number of LIBPACKs
           DC    HL2'm'              Number of LIBVEC slots
           DC    CL3'ppp'            Name prefix
           DC    XL1'nn'             Version Number
           DC    AL4(aaaaaaaa)       Addr of Address Resolver or 0
  ********************************************************************
  *  LIBPACK Information Section - Contains an entry for each LIBPACK*
  ********************************************************************
           DC    CL8'ssssssss'       LIBPACK name
           WXTRN kkkkkkkk
           DC    AL4(kkkkkkkk)       Address of LIBPACK.  See notes
  *                                  following figure.
           DC    BL8'flags'          LIBPACK attributes
  BIT0     EQU   X'80'               "Dynamic" LIBPACK
  BIT1     EQU   X'40'               "Resolve" invoke the Address
  *                                  Resolver Routine
  BIT27    EQU   X'37'               **** Reserved *******
           DC    AL1(0)              **** Reserved *******
           DC    AL2(k)              Entry number of first related
  *                                  entry on chain.
  *        .     .                   .
  *        (Additional LIBPACK entries are repeat of above 16 bytes)
  *        .     .                   .
  ***********************************************************************
  *  LIBVEC Information Section - Contains an entry for each LIBVEC     *
  *                               slot in LIBVEC slot order.            *
  ***********************************************************************
           DC    CL5'eeeee'          Library routine name suffix
           DC    BL8'flags'          Library routine attributes
  BIT0     EQU   X'80'               This routine is part of a LIBPACK
  BIT1     EQU   X'40'               Invoke address resolver
  BIT2     EQU   X'20'               Do Not Perform AMODE  switching
  *                                  code for this module.
  BITS37   EQU   X'3F'               *** Reserved ***
           DC    AL1(j)              LIBPACK number; index into LIBPACK
  *                                  Information Section)
           DC    AL2(k)              Entry number of next related
  *                                  entry on chain or 0 to indicate
  *                                  end of chain (if this routine is
  *                                  part of a LIBPACK).
  *        .     .                   .
  *        (Additional LIBVEC entries are repeat of above 9 bytes)
  *        .     .                   .
           END   CEEPLVD
Note:
  1. One or more LIBPACKs (and their library routines) can be directly link-edited with the LVD. In the LIBPACK information section, the address constant of a LIBPACK can also be defined as an A-type address constant of zero or a V-type address constant. A V-type indicates the address of the LIBPACK is always link-edited with the LVD. An A-type address constant of zero indicates the LIBPACK should always be loaded.
  2. The LVD must remain in memory for the life of the LIBVEC it represents. It is used by the subroutine loader as the source of the names of the modules to be dynamically loaded. However, it is designed to reside above the 16 megabyte line.
  3. The LVD is reentrant and can exist in the (E)LPA.
  4. Within the LIBVEC information section, the entries for the routines of a LIBPACK are forward chained together. When the subroutine loader determines that the routine to be loaded is part of a dynamic LIBPACK, it loads that LIBPACK. The chain is then followed to insure that the LIBVEC slots for all routines within the LIBPACK are updated.
  5. The LIBVEC owner can provide an address resolver routine (as part of the LVD contained load module). If present and the LIBPACK attribute resolve is flagged, this routine is invoked by LIBVEC initialization or the subroutine loader. It is passed the address of the LVD LIBVEC information section, the entry number of the first related entry on the chain, the address of the load module's external entry point. It returns a temporary LIBVEC table with addresses resolved to their respective LIBVEC slots.
    If the LIBPACK attribute resolve is flagged and no address resolver routine is present then a default address resolver internal to Language Environment program management is used. It assumes a table of address constants equal to the dimension of its related LIBVEC are located at the load module's external entry point. An entry for a particular routine must be in the same position within the table as its SLOTn is within LIBVEC. When the address resolver routine is invoked, R1 it points at the following parameter list.
    ARXPARMS DS   0F
             DS   F                          *** Reserved ***
    ARXLVD1  DC   A(first-LVD-entry)      IN,  Addr of first LVD info entry.
    ARXLVDM  DC   AL4(first-entry-number) IN,  entry number of first related
                                               entry on the chain
    ARXMODAD DC   A(Module-Entry)         IN,  Addr of LIBPACK load module
    ARXEPNAD DC   A(vector-table)         OUT, Addr of a temporary LIBVEC table
                                               with routine addresses in
                                               their respective slots.

    The address resolver routine must be written as REENTRANT AMODE 31 RMODE ANY. It is entered using BALR 14,15 in AMODE 31 and, therefore, can return using BR 14.