Re: AIX shared libraries

From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: "Tom Lane *EXTERN*" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: AIX shared libraries
Date: 2006-09-15 06:52:21
Message-ID: 52EF20B2E3209443BC37736D00C3C1380A5DE0A4@EXADV1.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2006-09-15 07:05:16 Re: Release notes
Previous Message Tom Lane 2006-09-15 05:27:04 Re: contrib uninstall scripts need some love