From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DDCA9A0542 for ; Fri, 2 Dec 2022 01:11:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4A6F42D15; Fri, 2 Dec 2022 01:11:16 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 48D1F40687; Fri, 2 Dec 2022 01:11:14 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 8117220B83C2; Thu, 1 Dec 2022 16:11:13 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8117220B83C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1669939873; bh=r+QEy5RdK3/TtACdWcTdvhWFD/yyitueifMF1zHRIEw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mLRMPOcOp7qGIoBImd5ohob9ZvQtfuyoE1lA6oqPkXIjia5ph9CDxP34Zk3BWxJ0r 07nyopL/65aiXLftQP3gBnb7rOnK45nBFXHef2PJ18048sqG9AwXrp1jNW6ZWioEGQ KwGCKg5S0US9xFRGvqgTxGTQCs3bHilZey1eb1os= Date: Thu, 1 Dec 2022 16:11:13 -0800 From: Tyler Retzlaff To: Ferruh Yigit Cc: David Marchand , dev@dpdk.org, stable@dpdk.org, Luca Boccassi , Bruce Richardson , Abdullah =?iso-8859-1?Q?=D6mer_Yama=E7?= Subject: Re: [PATCH] drivers: fix symbol exports when map is omitted Message-ID: <20221202001113.GI24029@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20221129140032.35940-1-david.marchand@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Tue, Nov 29, 2022 at 06:23:21PM +0000, Ferruh Yigit wrote: > On 11/29/2022 2:00 PM, David Marchand wrote: > > ld exports any global symbol by default if no version script is passed. > > As a consequence, the incriminated change let any public symbol leak > > out of the driver shared libraries. > > > > Not tested on Windows, but for Linux: just for awareness the default is the opposite on windows symbols are private by default and have to be explicitly made public. also, for gcc we could go to the extreme and pass -fvisibility=hidden and fix out any other symbols that are missed. if you're really going wild you may consider introducing a macro that can be expanded to __attribute__((visibility("default"))) combined with -fvisibility=hidden (as opposed to version.map) the main benefit being there's only a single source of truth about whether or not the symbol is public, you don't have to look in 2 places. (anyway, probably not a popular idea...) ty