Re: AIX shared libraries - Mailing list pgsql-hackers

From Albe Laurenz
Subject Re: AIX shared libraries
Date
Msg-id 52EF20B2E3209443BC37736D00C3C1380A5DE0A4@EXADV1.host.magwien.gv.at
Whole thread Raw
List pgsql-hackers
Tom Lane wrote:
> Ugh.  So given that linker behavior, it's basically impossible to
> support multiple libpq versions in the same directory anyway on AIX.

It is possible, if you have both versions of the shared object in
the same library. Essentially what I proposed for 3b).
It is the way IBM does it with their system libraries.

I set up a sample with libpq version 4 and version 5 in libpq.a:

$ dump -ov /postgres/8.2/lib/libpq.a
/postgres/8.2/lib/libpq.a[libpq.so.4]:                       ***Object Module Header***
[...]
Flags=( EXEC DYNLOAD SHROBJ LOADONLY DEP_SYSTEM )
[...]
/postgres/8.2/lib/libpq.a[libpq.so.5]:                       ***Object Module Header***
[...]
Flags=( EXEC DYNLOAD SHROBJ DEP_SYSTEM )
[...]

The linker will only link against the shared object that does
not have the LOADONLY flag set, but stuff linked against
libpq.a(libpq.so.4) will continue to work.

> I concur with your 3a) then.  Do you have time to do that now?

I'll start right away.

Yours,
Laurenz Albe


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: contrib uninstall scripts need some love
Next
From: Neil Conway
Date:
Subject: Re: Release notes