[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lt_dlopen fails on AIX
Re: lt_dlopen fails on AIX
Fri, 31 Aug 2012 17:43:20 -0500
On Aug 31, 2012, at 9:50 AM, Michael Haubenwallner wrote:
> On 08/30/12 15:29, Perry Smith wrote:
>> ... that you can have 32 bit objects (shared or not shared) and 64 bit
>> in the same archive ...
>> You can do similar tricks with executables and loadable kernel extensions.
> Offtopic: How does this work with executables?
Looks like I'm full of #$%!. I thought it worked with executables.
But... when I wrote that I did wonder the other question: why does
it work with kernel extensions but not shared objects? The kernel
extensions are loaded using a path like /usr/lib/drivers/scsi_driver
which is actually an archive and the loader looks inside and picks
the right one. Why couldn't dlopen do the same? Given the bit
size of the running application, look inside the archive and if
there is just one shared object of that size, then assume that is
the one that the application wants. That would be pretty cool.
>> Of topic slightly but… there are a ton of magic features that are available
>> selecting and loading libraries which the open source community doesn't grok
>> because "its not like Linux". I'm not 100% sure but from my perspective it
>> appears that whatever the .la file does is mostly built into ld and the
>> in AIX. The .la files in AIX are not needed.
>> I don't know what "ltdl" is
> "ltdl", provided by libtool, is a wrapper library around dlopen, ought to
> /one/ API to dynamically load modules on /any/ platform (that libtool
> It does read the .la file, to know how to load the module created by libtool,
> and uses a few fallbacks when there is no .la file for the requested module.
I wonder if maybe libtool needs a new concept and path (as I sorta
mentioned before). One would be for a shared object loaded via
dlopen. The other would be a shared object loaded by the loader
(what I would call a 'library').
Or, put the smarts I mentioned up above into the ltdl. It seems that
libtool already knows how to create the .so and stuff it into the .a. Why
not teach the wrapper the new tricks.
If path is a shared object, load it.
If path is an archive, look inside. If only one shared object is inside
with the same bit size as the executable, load it.
>> On that topic, the "prefix" set of tools (...) has been ported to AIX.
> Indeed: Gentoo Prefix on AIX forces runtime-linking on, and because of that,
> it can use a working variant of filename-based shared library versioning.
> Unfortunately, Gentoo Prefix may not bootstrap on AIX right now because of
> slacking due to workwork load...
Glad to see you are still around!
Re: lt_dlopen fails on AIX, Anatoly Belyaev, 2012/08/30
Re: lt_dlopen fails on AIX, Michael Haubenwallner, 2012/08/31