Roland Mainz wrote:
> 
> Does Sun Workshop/Forte/Studio have an option to strip all unused
> code/symbols from a shared library ?

There's not a "point and shoot" kind of feature that removes "unused stuff"
from your program.

The optimizer can remove uncalled static functions from object
files, and it can remove uncalled global functions if you're
using global optimization.  The strip command can be used
to remove debug information without damaging the dynamic symbol
table.  It's also a good idea (for several reasons) to create a
basic linker mapfile for your shared libraries so that you can
explicitly declare which symbols you intend to export.

Of course, this leads to the question: Why not just remove
all your unused code and symbols from the source code?
That's bound to be a more portable and robust approach to
your problem.

Probably there are specific symbols or code you have in mind
to remove, but you didn't say what those are.

--chris

Reply via email to