Roland Mainz wrote: > Hi! > > ---- > > Does Sun Workshop/Forte/Studio have an option to strip all unused > code/symbols from a shared library ? > > ---- > > Bye, > Roland >
Have you tried giving ld the -zignore option when building the library? Note that you'll have to use a mapfile to tell ld what the public symbols are. Absent such a mapfile, ld will assume that any globally visible symbol is "used", which will reduce its ability to eliminate things. In conjunction with -zignore, you might play with using the -xF option to the compiler. This causes all functions to get their own sections, which makes it possible for ld (with -zignore) to eliminate things on a per-function basis. - Ali
