nld and noft Manual
nld Utility
nld and noft Manual—520384-003
2-26
Linking Mixed-Language Programs
Overruling the Run-Time Consistency Check
The run-time consistency check can be overruled by the option -set
float_lib_overrule on. If you overrule the consistency check, the operating
system allows a floating-point inconsistency between the user library and the program.
If you do not set float_lib_overrule, and there is an inconsistency between the
program file and user library, the operating system generates an error code and does
not run the program.
If the float_lib_overrule is specified more than once by either the -set or
-change option, all occurrences except the last one are ignored. The
float_lib_overrule attribute can be changed only for loadfiles. An error occurs if
an attempt is made to change the value of this attribute for linkfiles.
Linking Mixed-Language Programs
When linking mixed-language programs that use IEEE floating-point format, specify the
-set floattype IEEE_FLOAT option.
For example, suppose that you have a mixed-language program composed of the
following modules:
•
A C module that uses IEEE floating-point format
•
A COBOL module that does not use floating-point format but is marked by the
COBOL compiler as TANDEM_FLOAT
When you link the modules together, you can do either of the following:
•
Use the -set floattype IEEE_FLOAT option to set the floating-point type of the
output object file to IEEE floating-point format.
•
Use the -change command to change the floating-point type of the COBOL object
file to NEUTRAL_FLOAT.
Example 2-11 links a mixed-language program that uses IEEE floating-point format.
The native C object file named COBJ uses IEEE floating-point format and the pTAL
object file uses Tandem floating-point format. (pTAL supports only Tandem floating-
point format.) If this nld command did not include the option -set floattype
IEEE_FLOAT, nld would issue error messages because of the mismatch between
Tandem and IEEE floating-point formats. Because this nld command does include the
option -set floattype IEEE_FLOAT, nld issues a warning message about the
mismatch and builds the loadfile MYEXEC. CRTLMAIN (a linkfile) and the LIBCOBEY
file (an Obey command file) are standard items required when linking C programs.
Example 2-11. Linking a Mixed-Language Program With IEEE Floating-Point
Format
nld $system.system.crtlmain cobj ptalobj -obey &
$system.system.licbobey -set floattype ieee_float -o myexec