H-Series Application Migration Guide (H06.07+, J06.03+)

The TNS/E Native Development Environment
H-Series Application Migration Guide429855-008
2-9
TNS/E Native Linker and Loader
eld accepts PIC object files and produces PIC executable object files, whereas nld
accepts non-PIC object files and produces non-PIC executable object files. Like nld,
eld can be used to produce both linkfiles and loadfiles. (A linkfile can be linked to
other linkfiles to produce a loadfile but cannot be loaded for execution. A loadfile
cannot be linked but can be loaded for execution.)
eld Enhancements
eld provides the same command options as nld, with the following exception:
Additionally, eld provides many enhancements over nld. Some of the more
significant enhancements are:
An option to use all linkfiles in archives, rather than using only those that provide
needed symbols.
Three options for searching archives and libraries: search only archives, search
only libraries (DLLs), and search both archives and DLLs. nld provides only two
options: search only archives and search both archives and SRLs.
An option to export all symbols that might normally be exported. nld provides only
the option to export a specified symbol.
The ability to specify a directory or subvolume for eld to search for archives and
DLLs before searching public libraries.
An option to specify treatment of unresolved symbols. Options are to treat them as
errors, to issue warnings, or to ignore them.
See the eld Manual for details on these and other enhancements, as well as options
used in building DLLs.
Different Handling of Unresolved External References
A significant difference between nld and eld is their treatment of unresolved external
references. nld does not treat an unresolved external reference as an error. During
execution, a program with unresolved externals will run without errors as long as the
missing procedures are not called. The default behavior of eld, by contrast, is to treat
an unresolved external reference as an error. Thus, a program containing unresolved
externals would link correctly using nld but would produce linker errors using eld
(assuming the default behavior). Two eld options are provided to override the eld
default behavior: -unres_symbols ignore and -set rld_unresolved ignore.
Either of these options causes eld to treat unresolved externals the same as nld.
See the eld Manual for more information on these and other differences between nld
and eld.
-import
This nld option is used to construct SRLs. SRLs are not supported
on TNS/E systems. eld provides similar options for use in building
DLLs. For more information, see the eld Manual.