Subject: Re: RFC: migration to a fully dynamically linked system
To: Todd Vierling <tv@wasabisystems.com>
From: Wolfgang Solfrank <ws@tools.de>
List: tech-userlevel
Date: 01/05/2002 02:28:36
Hi,
Todd Vierling wrote:
> 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.
Hmm, did you actually try this? I just did, and it worked like a charm.
I.e. both the main program and the dlopen()ed library function used the
same __sF[].
> So, in order to do dlopen() sanely, you need more than a binary with the
> "dynamic" flag set; you also need a dynamic libc.
That's correct, but for different reasons: the dlopen()ed library may
call
functions from libc that aren't linked into the main binary and can only
be
resolved from the dynamic libc.
Ciao,
Wolfgang
--
ws@TooLs.DE Wolfgang Solfrank, TooLs GmbH +49-228-985800