bug-libtool
[Top][All Lists]
Advanced

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

shared libraries and runtime linking on aix >= 4.2


From: Michael Haubenwallner
Subject: shared libraries and runtime linking on aix >= 4.2
Date: Tue, 18 Mar 2008 18:10:17 +0100

Hi,

another AIX (>= 4.2) specific question (any libtool version):

What is the partial reason that libtool uses a different shared library
style on AIX when "-brtl" is found in LDFLAGS ?

Without "-brtl":
*) static is disabled when shared is enabled.
*) libLib.so.1 is built using 'gcc -shared'
*) libLIB.so.1 is packed into libLIB.a.
*) this can provide some kind of 'soname' support.

With "-brtl":
*) static is enabled (into libLIB.a)
*) libLIB.so.1.2.3 is created using 'gcc -shared -Wl,-G'
*) symlink libLIB.so.1 -> libLIB.so.1.2.3 is created
*) symlink libLIB.so -> libLIB.so.1.2.3 is created
*) missing kind of 'soname' support.

One problem is the missing kind of 'soname' support with enabled -brtl.

AFAICT, runtime linking also works with libLIB.so.1 packed into
libLIB.a. And the decision wheter one executable uses runtime linking or
not can only be done when linking that executable with/out -brtl.
To allow shared libraries to use runtime linking (link with "${wl}-G")
does not imply an executable linked against it does use runtime linking.

Another problem might be that when one shared library is built with rtl
allowed (-G linker flag), which also works without rtl at all, linking a
subsequent executable does not find that library because it is named
lib.so, although it technically could be used without actually having
runtime linking enabled for that executable if it were called lib.a
(directly or packed into an archive).

Thoughts ?

Thanks!

/haubi/





reply via email to

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