Re: Use -fvisibility=hidden for shared libraries

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Use -fvisibility=hidden for shared libraries
Дата
Msg-id 20211101054700.z3jzmc5lnxlad4y7@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Use -fvisibility=hidden for shared libraries  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Use -fvisibility=hidden for shared libraries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2021-11-01 05:55:40 +0100, Laurenz Albe wrote:
> I see that at least clang and gcc support this flag.

Yes - and have for a long time. 2004 or so.


> Could the reduced number of exported functions be a problem, if someone
> relies on some function being exported?  It may not be worth worrying about,
> and they can always come and make a case for that symbol to be exported.

Hm. Possible, but I don't think common. It's pretty rare to need symbols
from a postgres extension shared library from another shared
library. The most common case are transforms. To add a new transform
one, from what I've seen, needs to expose previously internal stuff from
an extension anyway... And transforms aren't all that common.

And yes, we can easily just add a few additional exports over time.


One nice advantage of this is that the !windows build behaves more
similar to the windows case, which makes it easier to detect build
breakages locally...

Greetings,

Andres Freund



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Missing include in be-secure-openssl.c?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Time to drop plpython2?