bug-libtool
[Top][All Lists]
Advanced

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

Re: libtool-1.5.20 -- lt_dlopenext fails to open preloaded module


From: Peter Breitenlohner
Subject: Re: libtool-1.5.20 -- lt_dlopenext fails to open preloaded module
Date: Fri, 18 Nov 2005 15:27:06 +0100 (CET)

On Thu, 17 Nov 2005, Ralf Wildenhues wrote:

It might be even more useful to fix this bug!  libltdl should not _need_
the .la file at all, neither the .a file.

We have an entry for this on our online TODO list:
http://tkd.kicks-ass.net/GnuLibtoolProject/RoadMap

If you feel adventurous to work on a fix, be our guest!  ;-)

I might actually do that.

If so, I would imagine this strategy for lt_dlopenext(filename):

if FILENAME is nonempty and has no extension

        append ".a"   (is it clear that this is right in all cases?)

        bypass try_dlopen()

        check for module already open and return as in tryall_dlopen()

        bypass all (system or user defined) loaders and directly try to
        open the preloaded module via presym_open()
        return if successful

MAYBE:
        if FILENAME has extension".la" change that to ".a" and try as above

Next try to append ".la" and proceed as in the existing version

================

All that could actually be implemented by giving the two static functions
try_dlopen() and tryall_dlopen() an additional argument PRELOADED, such that
they only try to load preloaded or non-preloaded modules.

================

Some questions:

What about this idea?

Would it be OK to produce a patch relative to the libtool-1.5.10 release?

Should lt_dlopen("mod.la") behave as lt_dlopenext("mod")?

Shouldn't the "dlpreload" loader be removed from the chain of loaders (or
rather ignored in tryall_dlopen()) and treated as a special case (similar as
described above)?

I have the impression that the "dlpreload" loader can only succeed with a
filename ending in ".a" (or the program itself), whereas all other loaders
will never succeed with such a filename. Is that correct?

Probably not true, since I remember that AIX has shared libraries named
"libFOO.a". On the other hand, in ltdl's configure I only found ".so",
".dll", ".sl", and ".dylib".
But what about "libtool --mode=link -shrext SUFFIX"??

================

I've not yet had a chance to take a detailed look, but might ask back
some time later.  In case we find useful stuff, would you mind parts
ending up in a testsuite test?

Certainly not

regards
Peter Breitenlohner <address@hidden>




reply via email to

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