Shared libraries in Solaris and Linux use a versioning
technique which allows the link editor to record an
application's dependency on a particular release level
of the library.
This means in those OS's there is a way of marking applications
with the name and major revision level of a library they were
built with to ensure that application executables requiring a
given major version of a library (e.g. libfoo.so.2 ) are not
accidently linked with another major version of the library,
either a later ( libfoo.so.3 ) or earlier one ( libfoo.so.1 ),
since we know that these are incompatible with the application.
What is the equivalent facility provided in AIX?
The problem we are facing is this:
We have two executables ExeA and ExeB
ExeA uses libC_v1.a which is a shared library
ExeB uses libC_V2.a which is a shared library and is
a later version of libC_V1.a and
some functions in libC_V1.a are
different from that of libC_V2.a
but most are same.
We want to run both ExeA and ExeB at same time.
Is this possible?
> What is the equivalent facility provided in AIX?
There isn't one, however ...
> The problem we are facing is this:
> We have two executables ExeA and ExeB
>
> ExeA uses libC_v1.a which is a shared library
> ExeB uses libC_V2.a which is a shared library and is
> a later version of libC_V1.a and
> some functions in libC_V1.a are
> different from that of libC_V2.a
> but most are same.
>
> We want to run both ExeA and ExeB at same time.
> Is this possible?
if you just *name* your shared libraries like you did
above, there would be no problem -- ExeA will load
libC_v1.a, and ExeB will load libC_V2.a ...
Cheers,
--
In order to understand recursion you must first understand recursion.
AIX has the crazy idea that a shared module is a black box,
and as long as you don't change the API (external symbols) you
can do what you want to the inside, as long as applications don't
get broken. You can even modify the underlying module structure
if you like, and the application shouldn't care.
If you really need versioning, rename the file, or...
>
> What is the equivalent facility provided in AIX?
Since AIX allows you to use archives to contain modules, you
could do what X11 on AIX does. Old modules are kept around
in the archive, but marked LOADONLY; i.e. they can only be used
by existing applications at runtime. The newer, better, improved
module is the only one that is not marked load-only, and thus
visible to the linker. Building an application against that
library inherently causes it to use the new module. The old archive
members are ignored.
--
Gary R. Hook / AIX PartnerWorld for Developers / These opinions are MINE
________________________________________________________________________