[Top][All Lists]

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

Re: lt_dlopenadvise ignores advice

From: Anton Ertl
Subject: Re: lt_dlopenadvise ignores advice
Date: Fri, 18 Apr 2008 21:47:26 +0200 (CEST)

Bob Friesenhahn wrote:
> On Fri, 18 Apr 2008, Anton Ertl wrote:
> > The program below is a variation of the my_dlopenext example from the
> > manual.  Calling it with the correct extension works, but calling it
> > without extension does not:
> >
> > [c8:~/tmp:15553] a.out libffi.so
> > 0x501230
> > [c8:~/tmp:15554] a.out libffi
> > my_dlopenext: file not found
> I don't believe that libltdl itself knows anything about shared 
> library naming conventions.

The documentation of lt_dlopenext says otherwise:

     [...] If the file with the file
     name FILENAME cannot be found libltdl tries to append the
     following extensions:

       1. the libtool archive extension `.la'

       2. the extension used for native dynamically loadable modules on
          the host platform, e.g., `.so', `.sl', etc.

     This lookup strategy was designed to allow programs that don't
     have knowledge about native dynamic libraries naming conventions
     to be able to `dlopen' such libraries as well as libtool modules

> It is intended that the .la files be 
> installed (as libtool --mode=install does) and that the application 
> specify the name of the .la file.  This works since libltdl opens the 
> .la file to learn the name of the module to load.  In addition to 
> learning the name, libltdl can do any additional pre-loading that the 
> module needs in case the OS does not support it or the module itself 
> does not know all its dependencies.
> Is there a reason why you would not want to do that?

I need to dlopen pre-existing libraries (say, libm) in addition to
stuff I built using libtool.  lt_dlopenext() and lt_dladvise_ext()
look like they are intended to help smooth over the naming convention
differences between platforms (which would be very useful for my
application), not just a fancy way to append ".la".

If libtool --mode=install is intended to be applied to pre-existing
libraries, this does not come out in the documentation.  I interpret
it as being intended for installing libraries I built with libtool.

- anton

reply via email to

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