Re: Bumping libpq version number?

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bumping libpq version number?
Date: 2005-03-13 21:36:57
Message-ID: slrnd39cjp.3a6.andrew+nonews@trinity.supernews.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2005-03-13, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> Andrew - Supernews wrote:
>> On 2005-03-11, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
>> > I can think of no way to prevent it, except on Win32 that has an exports
>> > file.
>>
>> At least a significant minority, if not an actual majority, of Unix
>> platforms do allow this; including (to my knowledge) Solaris, AIX and
>> everything using ELF with GNU ld (therefore including Linux and FreeBSD).
>
> OK, how is this done with ELF?

Using version commands in a linker script file.

The minimal example looks about like this (for GNU ld, for Solaris ld
leave off the outer VERSION { } wrapper):

VERSION {
{
global: foo; bar; baz;
local: *;
};
}

This makes all symbols other than "foo", "bar" and "baz" into local symbols,
not visible outside the library.

This much of the Solaris-style symbol versioning support is handled entirely
in the linker and thus should work on any system with ELF and GNU ld, or on
Solaris with the native linker. (The rest requires runtime support, which
probably doesn't exist on platforms other than Solaris.)

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Palle Girgensohn 2005-03-13 21:47:53 where is the locale set for each server instance?
Previous Message Simon Riggs 2005-03-13 21:26:13 Re: Cost of XLogInsert CRC calculations