nld Manual

nld Utility
nld Manual528272-001
2-28
Stripping Symbol Information
Stripping Symbol Information
Native object files contain symbol information to be used when linking or debugging.
The amount of symbol information produced by a compilation can be controlled by the
SYMBOLS compiler directive or pragma.
The nld utility can remove some or all symbol information as it creates an output file.
If you use -strip to remove the symbol information from an existing loadfile, the
result is the same as if you had used -s when you created the object file.
The -x option is similar to the Binder command STRIP SYMBOLS. You can partially
strip an existing object file by giving nld only one input file name and giving it the
same input file name for the output file name. If the symbol information is partially
stripped with -x and you specify -r on page 3-11, you can use the output file again as
nld input.
If the symbol information is completely stripped with the -s flag, the file cannot be used
as nld input. You cannot use -s and -r together.
Outside of nld, you can remove symbol information from an existing loadfile with the
strip utility.
nld Compilation Rules
The nld utility enforces separate compilation rules for linking native programs in C,
C++, COBOL, and pTAL.
Topics:
Case-Sensitivity on page 2-28
Local and Shared Symbols on page 2-29
Declaration and Definition on page 2-30
Case-Sensitivity
C and C++ are case-sensitive; COBOL and pTAL are not. In C and C++, the symbol
names x and X refer to different symbols. In COBOL and pTAL, all symbol names are
converted to uppercase letters, so x and X refer to the same symbol.
Option Strips symbol information used for ... From ...
-s
on page 3-12 Linking and symbolic debugging Loadfile
-strip
on page 3-16 Linking and symbolic debugging Existing loadfile
-x
on page 3-17 Symbolic debugging Loadfile