Re: Bumping libpq version number?

Поиск
Список
Период
Сортировка
От Andrew - Supernews
Тема Re: Bumping libpq version number?
Дата
Msg-id slrnd39cjp.3a6.andrew+nonews@trinity.supernews.net
обсуждение исходный текст
Ответ на Re: Bumping libpq version number?  (Andrew - Supernews <andrew+nonews@supernews.com>)
Список pgsql-hackers
On 2005-03-13, Bruce Momjian <pgman@candle.pha.pa.us> wrote:
> Andrew - Supernews wrote:
>> On 2005-03-11, Bruce Momjian <pgman@candle.pha.pa.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Cost of XLogInsert CRC calculations
Следующее
От: Oleg Bartunov
Дата:
Сообщение: materialized views