Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDAXF-0002KM-B5 for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Jul 2022 20:06:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oDAXE-0004uw-6K for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Jul 2022 20:06:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDAXD-0004un-Sq for pgsql-hackers@lists.postgresql.org; Sun, 17 Jul 2022 20:06:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDAXB-0004As-Gn for pgsql-hackers@postgresql.org; Sun, 17 Jul 2022 20:06:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 26HK6SiM234828; Sun, 17 Jul 2022 16:06:28 -0400 From: Tom Lane To: Andres Freund cc: Peter Eisentraut , Laurenz Albe , pgsql-hackers@postgresql.org Subject: Re: Use -fvisibility=hidden for shared libraries In-reply-to: <20220717200041.6um6dmvxujtljm6q@awork3.anarazel.de> References: <20211101020311.av6hphdl6xbjbuif@alap3.anarazel.de> <20211101054700.z3jzmc5lnxlad4y7@alap3.anarazel.de> <2499085.1641859296@sss.pgh.pa.us> <20220111025328.iq5g6uck53j5qtin@alap3.anarazel.de> <5b8d48a4-2fee-6764-7eda-a076f544ea33@enterprisedb.com> <20220716201750.qq6xwegkgp7xqi5w@awork3.anarazel.de> <180138.1658084088@sss.pgh.pa.us> <20220717200041.6um6dmvxujtljm6q@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sun, 17 Jul 2022 13:00:41 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <234826.1658088388.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 17 Jul 2022 16:06:28 -0400 Message-ID: <234827.1658088388@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > That's also the reason -fvisibility=3Dhidden isn't added to libpq and th= e ecpg > libs - their symbol visility is done via exports.txt. Depending on the > platform that'd not work if symbols were already hidden via > -fvisibility=3Dhidden (unless explicitly exported via PGDLLEXPORT, of > course). Got it. Yeah, let's not break those cases. (I don't think we dare put PGDLLEXPORT into libpq-fe.h, for example, so it might be hard to solve it any other way anyhow.) >> 2. I'm not really thrilled with the symbol names C[XX]FLAGS_SL_MOD; >> it's not apparent what the MOD means, nor is that documented anywhere. > It's for module, which I got from pgxs' MODULES/MODULE_big (and incident= ally > that's also what meson calls it). Definitely should be explained, and pe= rhaps > be expanded to MODULE. I guessed as much, but +1 for spelling it out as MODULE. regards, tom lane