Subject: Re: RFC: migration to a fully dynamically linked system
To: Bill Studenmund <wrstuden@netbsd.org>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-userlevel
Date: 01/04/2002 17:44:48
On Fri, 4 Jan 2002, Bill Studenmund wrote:

: But the "conflict" between dynamic & static
: symbols is, as I understand it, a show stopper. The problem is that it's
: not a duplicate symbol, but that there are two different ones. The static
: binary won't, by default, retain the symbolic names for the variables it
: has in its globals, so there's no way to tie the static & dynamic ones
: together. The static code will be using one version, and the dynamic code
: another.
:
: Oh, I don't think that's specific to ELF.

Right.  It's not even specific to `static' binaries, and you can demonstrate
the lossage right now:

Compile ashared object that writes to stdout, then use that library from a
program that also writes to stdout.  Finally, link the program against both
the dynamic library above, and /usr/lib/libc.a (the statically linked
version of libc).

You should end up with a binary using one __sF[], and a library using
entirely another.

So, in order to do dlopen() sanely, you need more than a binary with the
"dynamic" flag set; you also need a dynamic libc.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/