ld Manual

Introduction to ld
ld Manual529650.001
1-22
Stripping Symbol Information
Stripping Symbol Information
Native object files contain symbol information to be used when linking or debugging.
You can control the amount of symbol information produced by a compilation using the
SYMBOLS compiler directive or pragma.
ld 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 ld only one input file name and giving it the same
input file name for the output file name.
If the symbol information is completely stripped with the -s flag, the file cannot be used
as ld input.
Outside of ld, you can remove symbol information from an existing loadfile with the
strip utility. For information about the strip utility, see the noft Manual.
Option Strips symbol information used for ... From ...
-s
Linking and symbolic debugging Loadfile
-strip
Linking and symbolic debugging Existing loadfile