
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
Summary of Contents for nld
Page 12: ...Contents nld and noft Manual 520384 003 x ...
Page 16: ...What s New in This Manual nld and noft Manual 520384 003 xiv Miscellaneous ...
Page 22: ...About This Manual nld and noft Manual 520384 003 xx Change Bar Notation ...
Page 28: ...Introduction to the Utilities nld and noft Manual 520384 003 1 6 strip ...
Page 60: ...nld Utility nld and noft Manual 520384 003 2 32 Declaration and Definition ...
Page 78: ...nld Options nld and noft Manual 520384 003 3 18 y ...
Page 90: ...noft Utility nld and noft Manual 520384 003 4 12 Debugging With noft ...
Page 150: ...strip Utility nld and noft Manual 520384 003 7 2 ...
Page 242: ...nld Diagnostic Messages nld and noft Manual 520384 003 10 82 Informational Messages ...
Page 278: ...noft Diagnostic Messages nld and noft Manual 520384 003 11 36 Syntax Errors ...
Page 286: ...ar Diagnostic Messages nld and noft Manual 520384 003 12 8 ...
Page 314: ...Sample nld and noft Session nld and noft Manual 520384 003 A 28 LISTSRLFIXUPS ...
Page 330: ...Index nld and noft Manual 520384 003 Index 10 Special Characters ...