[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: dlopen () question
On Tue, Apr 08, 2008 at 07:30:31PM +0200, Joerg Sonnenberger wrote:
> On Tue, Apr 08, 2008 at 05:57:24PM +0100, David Laight wrote:
> > However it isn't a good idea to rely on symbols being resolved in
> > that way. Consider, for example, what happens if your 'main program'
> > code is moved into a shared library, and then that library is opened
> > with dlopen() - it is then almost impossible to get the plugin to
> > reference a symbol in the library.
> Shared libraries always export symbols, so this is far less a problem.
You've missed the point, a dlopen()ed library will fix up against
symbols in the program itself, and those libraries loaded at program
load time. The symbols of the library itself end up in a separate
namespace - so are not available when that code opens a 2nd library.
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |