What the prelinker does
The prelinker performs the following functions:
- Collects information for runtime initialization, including data initialization for C/C++, constructor/destructor calls for static objects in C++, and DLL initialization information.
- For C object modules compiled with RENT, C++ programs, Enterprise PL/I for z/OS programs,
or COBOL programs with OO extensions, the prelinker:
- Combines writable static initialization information
- Assigns relative offsets to objects in writable static storage
- Removes writable static name and relocation information
- For programs containing longnames, such as C programs compiled with LONGNAME, C++ programs, Enterprise PL/I for z/OS programs, and COBOL programs compiled with PGMNAME(LONGMIXED) or PGMNAME(LONGUPPER), the prelinker maps LONGNAME option to SHORTNAME option on output.
- For programs that use DLLs, the prelinker:
- Generates a function descriptor in writable static for each DLL referenced function
- Generates a variable descriptor for each DLL referenced variable
- Generates an IMPORT control statement for each exported function and variable
- Generates internal information for the load module that describes symbols that are exported to and imported from other load modules
- Combines static DLL initialization information
- Uses longnames to resolve exported and imported symbols