Specifications
Linking a Device Driver
9.2 Resolving CRTL References at Link-Time
However, execlets and user-written system services typically link /NOSYSSHR
and resolve external symbols without references to other shareable images.
Two options exist for resolving CRTL symbols at link time without references to
DECC$SHR.EXE:
• Resolving them out of STARLET.OLB (all the objects that comprise
DECC$SHR.EXE exist in STARLET.OLB)
• Link /SYSEXE and resolving the symbols from SYS$BASE_IMAGE.EXE (the
kernel CRTL).
There are, however, several ways to resolve symbols from STARLET, and peculiar
interactions between various linker qualifiers should be noted.
Most (or all) execlets link /NOSYSSHR/NOSYSLIB/SYSEXE and explicitly
extract needed modules from STARLET.OLB and include other objects from
various places. Using this method, CRTL references will be resolved from
SYS$BASE_IMAGE.EXE. Any references to CRTL routines not supported by the
kernel CRTL will generate an undefined symbol error by the linker.
User-written system services have several options. If the code runs in executive
or kernel mode exclusively at IPL 0, it may be able to use the full complement of
CRTL routines (from STARLET) and not be bound by the subset supported by the
kernel CRTL (in SYS$BASE_IMAGE). It may or may not link /SYSEXE for other
reasons, depending on whether it requires access to system data cells or routines.
For example, if a user-written system service links /NOSYSSHR/SYSLIB
/SYSEXE. All references to kernel CRTL routines will be resolved from
SYS$BASE_IMAGE. Any CRTL references not supported by the kernel CRTL will
be resolved from STARLET, which may or may not be the desired behavior. If any
references are resolved from STARLET, this can possibly lead to multiply-defined
symbols as well. It is not recommended.
If the user-written system service does not link /SYSEXE and links /NOSYSSHR
/SYSLIB, all CRTL references will be resolved from STARLET. The user can
choose instead to resolve these symbols from SYS$BASE_IMAGE by using the
/SYSEXE qualifier.
If the user-written system service must link /SYSEXE for other reasons but
wants all CRTL references to be resolved from STARLET, the order in which the
linker would resolve the CRTL symbol references must be changed as follows:
$ link/nosysshr/nosyslib/sysexe=selective user_objects,sys$input/opt
sys$library:starlet.olb/lib
sys$loadable_images:sys$public_vectors.exe/share
STARLET.OLB will be searched to resolve the CRTL symbols first, making
it unnecessary to resolve them in processing /SYSEXE later. Using
/SYSEXE=SELECTIVE avoids multiply-defined symbols.
9–5










