Re: Use -fvisibility=hidden for shared libraries
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Laurenz Albe <laurenz.albe@cybertec.at>, pgsql-hackers@postgresql.org
Date: 2022-10-16T02:08:08Z
Lists: pgsql-hackers
Hi, On 2022-09-01 14:19:35 -0700, Andres Freund wrote: > Here's an updated patch for this (also shared recently on another thread). I've since then committed this. I was reminded of this when thinking about https://postgr.es/m/1595488.1665869988%40sss.pgh.pa.us Thinking about this made me realize that we currently don't expose -fvisibility=hidden via pg_config. It's added to extensions built via PGXS, via Makefile.global, but that doesn't help extensions that don't want to use PGXS. I guess we should report the CFLAGS_SL_MODULE etc via pg_config? Greetings, Andres Freund
Commits
-
Mark all symbols exported from extension libraries PGDLLEXPORT.
- 8cf64d35eacc 16.0 landed
-
Default to hidden visibility for extension libraries where possible
- 089480c07705 16.0 landed
-
Remove now superfluous declarations of dlsym()ed symbols.
- fd4bad165539 16.0 landed
-
Add central declarations for dlsym()ed symbols
- f2b73c8d75d5 16.0 landed