nld and noft Manual

nld Utility
nld and noft Manual520384-003
2-29
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 filename and giving it the same
input filename for the output filename. 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, then the file cannot be
used as nld input. It is not possible to use -s and -r together.
Outside of nld, you can remove symbol information from an existing loadfile with the
strip utility. See Section 7, strip Utility.
nld Compilation Rules
The nld utility enforces separate compilation rules for linking native programs in C,
C++, COBOL, and pTAL.
Subsections:
Case Sensitivity on page 2-29
Local and Shared Symbols on page 2-30
Declaration and Definition on page 2-31
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, 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