libtool
[Top][All Lists]
Advanced

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

Re: Configuring libtool HEAD branch.


From: mcnichol
Subject: Re: Configuring libtool HEAD branch.
Date: Tue, 17 Apr 2001 10:42:57 -0500

> From: Russ Allbery <address@hidden>
> 
> Piggybacking off of Gary's response....
> 
> > On Monday 16 April 2001 11:05 pm, address@hidden wrote:
> 
> >> - When building libtool without run-time-linking, my changes do still
> >> create a lib<name>.a.  However, it is an actual archive containing the
> >> shared object (just like the quirky way the rest of AIX does it).
> >>   What you end up with is a libltdl.a that contains both the shared and the
> >>   non-shared object.  This is not really what was intended, and would
> >> likely cause problems if you ever really needed to use the non-shared
> >> object, but for the most part it seems to work.  The only other thing I can
> >> think to do is not bulid the non-shared object in this case.
> 
> But isn't this how AIX natively supports having both a shared and unshared
> version of the library available at the same time?  I think this is
> actually closer to exactly what you want than one might think.  I'm only
> remembering this very vaguely from discussion in other lists, but I seem
> to recall that AIX's native tools can then select static or shared linking
> by choosing which objects in the .a they pull in.

Well sort of.  There are several libraries on AIX that contain shared and
non-shared members in the archive.  However, the members contain different code.
The linker will simply search the members in the archive, in order, for symbols
it is interested in.  In this case it will always find the symbols it needs
in the shared member, and I don't believe it will ever look at the unshared
member.


> 
> Some vague memory also tells me that this is how shared library versioning
> is done (with differently named shared objects).
> 

Yes this is correct.  Typically what is done is all but the newest version
of the shared members have a special LOADONLY flag set so that the linker
will only see the newer member.  But the loader can find any of the members
at run time.  If for some reason you need to link with an older version of
the shared library, you generally use an import file.

Dan McNichol
IBM, Austin Texas



reply via email to

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