Re: stripping binaries



Junichi Saito <j.saito@wanadoo.fr> writes:
> On 15 Apr 1999, Raja R Harinath wrote:
> >Don't use --strip-unneeded on libraries.  (Simplistic explanation
> >alert) Libraries don't have entry points, so most of it is "unneeded"
> >as far as strip is concerned.  Use only
> >
> >        strip -g
> >
> >or
> >
> >        strip --strip-debug
> >
> >on libraries.  That should be enough to make them small.
> 
> Could you give some more explanation ? I always have run 'strip
> --strip-unneeded' on shared libs and haven't experienced any problems so
> far, at least, as far as compiling/running is concerned. What exactly can
> cause problems other than for debugging , if I run 'strip
> --strip-unneeded' ?

strip --strip-unneeded is probably OK on shared libs, since the public
symbols will be referenced in the lookup table.  However, static
libraries will have problems.  Someone with more knowledge of how
strip/linkers work will give you a better answer.

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]