DLL Programmer's Guide for TNS/R Systems
Advanced DLL Facility Controls
DLL Programmer’s Guide for TNS/R Systems—522203-002
5-7
Controlling the Load Image of DLLs
saveabend possible values are on and off. The default is off.
space_guarantee has a numeric value with a default of zero (0).
systype sets the system type of the loadfile being linked. Possible values are OSS
and Guardian. See Execution-Target System Type on page 2-20.
Controlling the Load Image of DLLs
Segmenting Loadfiles
The linker produces the output loadfile in two segments, text and data.
Specifying the Preferred Location of a Loadfile in Virtual
Memory
The linker assigns addresses for these segments by default; you can specify non-
default values with the following options:
-t address sets the starting address of the text segment (headers and code).
-d address sets the starting address of the data segment.
In both cases, the linker rounds up address to a virtual memory page boundary. If
-t, but not -d, is inserted, then -t specifies the starting address of the entire
contiguous DLL. By inserting -d, you can cause the DLL to load in two separate
regions.
By default, the loader loads the text and data of a DLL into a contiguous virtual-
memory area, starting with the text (including code) section. This area is chosen to
avoid memory interference with other loaded files. These linker-assigned addresses
are called the preferred addresses; if this address range for a DLL is available, the
loader will use it.
If -t, but not -d, is inserted, then -t specifies the preferred starting address of the entire
contiguous DLL. By inserting -d, you can cause the linker to assign the two DLL
segments to disjoint address ranges. If you do that, the loader will reject the DLL.
In contrast to a DLL, a program is always divided into two separate regions. For a
program, the default for -t is 0x70000000 and for -d is 0x08000000. If a non-default
value is specified, the loader will reject the program.
Summarizing these two options: -t is useful to specify a preferred address for a DLL, so
that it will not overlap the preferred address ranges of other DLLs that will appear in the
same process; with non-overlapping address ranges the DLLs will load slightly faster.
Otherwise, -t and -d are useful only in peculiar circumstances that are beyond the
scope of this manual.