On Mon, Mar 10, 2008 at 9:59 PM, Dave Smith <[EMAIL PROTECTED]> wrote:

> Andres Gonzalez wrote:
> > My question is about the utility "strip"   If I use strip on the
> > shared library, then nm reports that there are no symbols in the .so
> > library.  But I can still use the stripped library and link to it.
> >
> > How is this so?  If strip removes the symbols, how can you then link
> > other code to it?
> >
>
> <http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/strip.1.html>
> In a nutshell I believe, though I haven't confirmed it, that if you
> strip a .so file, you will no longer be able to dlopen() it and call
> functions contained therein by name. However, as you have discovered,
> you will still be able to link against it, because the linker is smart
> about numerical offsets into the file and doesn't need named symbols. I
> will write some code in a moment to experiment with this, but I think
> that's the nutshell description.


You can dlopen() stripped .so files.  Stripping normally just removes debug
information, or "stuff for wimps," as Dr. Goodrich[1] used to call it.

[1] http://cs.byu.edu/faculty/goodrich_michael_a

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to