HP eld Manual page 37

Table of Contents

Advertisement

eld Input and Output
Sometimes the linker is required to put a filename back together from its two pieces.
The linker concatenates the two pieces using a period on Guardian, a slash on OSS,
or a backslash on the PC.
A Note About MAP DEFINES
A DEFINE is a collection of attributes to which a common name has been assigned.
These attributes can be passed to a process simply by referring to the DEFINE name
from within the process. The =_DEFAULTS DEFINE is an example of such a DEFINE;
this DEFINE passes the default node name, volume, and subvolume to a process.
The DEFINE mechanism can be used for passing file names to processes; this kind of
DEFINE is called a CLASS MAP DEFINE. The following example creates a CLASS
MAP DEFINE called =MYFILE and gives it a FILE attribute equal to
\SWITCH.$DATA.MESSAGES.ARCHIVE:
1> SET DEFINE CLASS MAP, FILE \SWITCH.$DATA.MESSAGES.ARCHIVE
2> ADD DEFINE =MYFILE
Whenever your process accesses the DEFINE =MYFILE, it gets the name of the file
specified in the DEFINE. For example, when your process opens =MYFILE, the file
that actually gets opened is \SWITCH.$DATA.MESSAGES.ARCHIVE.
There are various items on the
parameters of various options, such as -o, -l, -strip, etc., as well as filenames
that are just written directly on the command line. For such command line items,
checks if they begin with equal signs. If so, in the Guardian case, the linker will
immediately do the expansion of the DEFINE, so that all uses thereafter are the same
as if the expanded name had been given originally (with one special case described
below). The expansion of the name should also be done in upper-case, and the linker
will put out an informational message. If the specified string cannot be expanded as a
MAP DEFINE, that is an error. And, on other platforms, such as the PC or OSS, if a
filename parameter begins with an equal sign, that is unconditionally an error.
On the other hand, there are certain items on the command line that are not filenames,
although they look similar to filenames. In such cases, if the string starts with an equal
sign, that is always an error, even on Guardian. Examples of this include the names of
subvolumes specified in options such as -L and -rpath, and the DLL name specifed
by the -soname option.
When it comes to parameters that are symbol names, no such rules apply. An equal
sign at the start of a symbol name has no special significance to the linker.
There is a special case. In the case of the -libname (or -set libname, or -
change libname) option, usually, it is an error if the parameter is not exactly of the
form $a.b.c. However, a DEFINE can be used for this, even though a DEFINE always
expands to the form \system.$a.b.c. In these contexts, after expanding the DEFINE,
the linker also removes the system name.
command line that are filenames. These include the
eld
eld Manual—527255-009
2-3
Filenames and The File Identifier
eld

Advertisement

Table of Contents
loading

Table of Contents