[Top][All Lists]

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

Re: ltdl weirdness

From: Bob Friesenhahn
Subject: Re: ltdl weirdness
Date: Mon, 23 Feb 2009 12:50:03 -0600 (CST)

On Mon, 23 Feb 2009, Matj  Tý wrote:

Hello all,
I am using libltdl in my project and I experience some unexpected things.

First of all, if I have some undefined references in my module, the
module can't be loaded using lt_dlopen neither using its ext variant.
The reason for that is stated as "could not find the file", but this
is not the case. If I correct those undefined references, everything
statrts to work. BTW the 'dltest' tool had helped me, although it is a
pity that it doesn't support loading symbols from executables that
would load the module.

This bug was reported quite some time ago and is not yet corrected. It is due to an incorrect overwrite of the error message by the module "preopen" code.

Next, if the executable is compiled with -export-dynamic, things that
were compiled in really provide symbols that would be missing in the
module. However, things that were linked in as external libs don't
seem to be exported. Is this expected behaviour? However, there is a

Yes, this is now the expected behavior. Older libltdl allowed libraries required by loaded modules and module symbols to become part of the global namespace. As of libtool 2.2.X, this is no longer the default. Libltdl is designed to be a module loader rather than a shared library loader.

difference between having nothing and between having linked external
symbols in executable compiled using -export-dynamic flag -- the first
case results in the inability to open the module (see the first
problem), whereas the latter results in runtime error.
Any suggestions regarding good practices?

It is necessary for all symbols to be already available in the using program or library, or referenced by the module as a dependency, when the module is loaded.

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]