View Single Post

   
  #2 (permalink)  
Old 01-05-2008, 08:02 AM
Paul Pluzhnikov
 
Posts: n/a
Default Re: SONAME in AIX libraries

"smiletolead" <developeratca@gmail.com> writes:

> Can anyone tell me whether there is SONAME and NEEDED attributes
> registered in AIX libraries.


No. There is an equivalent of NEEDED, it's encoded in the loader
section:

$ dump -H /bin/date
/bin/date:
...
***Import File Strings***
INDEX PATH BASE MEMBER
0 /usr/lib:/lib:/usr/lpp/xlC/lib
1 libc.a shr.o

This says that "libc.a(shr.o)" is needed for /bin/date to execute.

> If not, how library versioning is managed in AIX?


What's the problem you are trying to solve?

Library versioning on AIX is usually managed this:

You ship library libfoo.a, containing a single shr.o ...

You later fix some bugs, producing a new (compatible) version. You
still ship libfoo.a with shr.o; all old applications will happily
use that.

Now you introduce a new incompatible version. You make it shr2.o,
and ship libfoo.a with 2 shared modules: shr.o and shr2.o. You also
mark shr.o with a LOADONLY flag, so when new applications are linked,
the linker will not consider shr.o and will only use shr2.o.

The old applications are still happy (using "libfoo.a(shr.o)"),
and the new apps can use "libfoo.a(shr2.o)".

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Reply With Quote