Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Building a DLL application z/OS Language Environment Programming Guide for 64-bit Virtual Addressing Mode SA38-0689-00 |
|
The DLL application may consist of multiple source modules. Some of the source modules may contain references to imported functions, imported variables, or both. To use a load-on-call DLL in your DLL application, perform the following steps:
After final autocall processing of DD SYSLIB is complete, all DLL-type references that are not statically resolved are compared to IMPORT control statements. Symbols on IMPORT control statements are treated as definitions, and cause a matching unresolved symbol to be considered dynamically rather than statically resolved. A dynamically resolved symbol causes an entry in the binder B_IMPEXP to be created. If the symbol is unresolved at the end of DLL processing, it is not accessible at run time. Addresses of statically bound symbols are known at application load time, but addresses of dynamically bound symbols are not. Instead, the runtime library that loads the DLL that exports those symbols finds their addresses at application run time. The runtime library also fixes up the importer's linkage blocks (descriptors) in C_WSA64 during program execution. The following code fragment illustrates how a C++ application
can use the TRIANGLE DLL described previously (see Writing your C++ DLL code). Compile normally and bind with
the definition side-deck provided
with the TRIANGLE DLL.
The following code fragment illustrates how an assembler routine
can use the ADLL6EV2 DLL described previously (see Writing your Language Environment-conforming AMODE 64 assembler DLL code). Assemble and bind with the definition side-deck provided
with the ADLL6EV2 DLL.
Figure 1. Assembler DLL application calling an assembler DLL
See Figure 1 for a summary of the processing steps required for the application (and related DLLs). |
Copyright IBM Corporation 1990, 2014
|