From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 210A443891;
	Thu, 11 Jan 2024 10:48:43 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id E58664025E;
	Thu, 11 Jan 2024 10:48:42 +0100 (CET)
Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31])
 by mails.dpdk.org (Postfix) with ESMTP id 4475240042
 for <dev@dpdk.org>; Thu, 11 Jan 2024 10:48:41 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1704966520; x=1736502520;
 h=date:from:to:cc:subject:message-id:references:
 content-transfer-encoding:in-reply-to:mime-version;
 bh=kzbRX9o+Q4pjDSMG/ZLNKngfe6sF25U25x6shKQ5rSo=;
 b=KBCzTZBh3Q1CDHCE47VnM1Iyko7I/gYTMhBTt4SiYJ0NB/w0dOvw+UaD
 8Dzexl+jljI7xBiiPUC0xy+H75ZxajFyRwsV9Iv3UPyUPqKnnSROjmAK4
 xs/NJgcYneQdYNfdgnHbgahpntBGkdY51q2rj/PC9ZC3eRxOBQzD6SyKO
 uTQzA6JTbtfT0axczDoxzDwsPDCYjfDnwRBkPWcebwPLSW7Xj3p/WCeu/
 D6ITJ/OdtqN0ijJMe8fG7ZSvZwdCFGWVGZED4CEvZc9gvnYrZcgg2xOK1
 4fIOYjrlCk9Ib8Za2l+F1sy0MbTA0zO/auHn/jB+XAl2Teonn2oZZ3LuK g==;
X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="463085443"
X-IronPort-AV: E=Sophos;i="6.04,185,1695711600"; d="scan'208";a="463085443"
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 11 Jan 2024 01:48:38 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="872968542"
X-IronPort-AV: E=Sophos;i="6.04,185,1695711600"; d="scan'208";a="872968542"
Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16])
 by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384;
 11 Jan 2024 01:48:39 -0800
Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by
 ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.2507.35; Thu, 11 Jan 2024 01:48:39 -0800
Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by
 ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.2507.35; Thu, 11 Jan 2024 01:48:38 -0800
Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by
 orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
 15.1.2507.35 via Frontend Transport; Thu, 11 Jan 2024 01:48:38 -0800
Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168)
 by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.1.2507.35; Thu, 11 Jan 2024 01:48:39 -0800
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=aR3X6S6JO5olfo3KObIYMvjzyl1I/V1LEk7fEj7zFpDLMOggYQMP2hK4vVJNk+TT2sMmy2HpYFowdDxAi2racxWAfSEPHVZzT7xeyem9BNWCu42IfWZa74GoQxUlHM2F7VK2L5R/m+M/Cio19rP3jFhJP6Z2wWWA41N32RdNSOnRPf0JUoYmO5QGJpeCyIfiR4AoFF459iQJSHOLIX4O+07YLcoPmV/iHUjecuxoMN3WIpl2W3GAiZq0Fb9qPpdSVEu7MtPNQUA7+6IARkQH+yjS9I6GTWUneU40/5kNEk0IzS9fdC8Zyo6gw+GLx2eS3AFV818PsvscXgn4Elu1FQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=jL3tfy3aTjiog5p5je+GtA8D/gEzd4gsnvkBxZ7coc0=;
 b=jXKlTAP2ccBVs8tbw2v+aNWTGOhiWPxw20BL5mZ9yxC9aIHJZmAjw+gCe3PH+TW0vcsfz1N8UzPc70t6+SWlj965szZlxklyb3T7BHgZ1KKWYMR7vxVFU3w3iR1PK8dfBLLbHerEgGgpLLG/g07bISJ5Y1TkaH6d/drldLVR/hmeuduhQGgMjO7gQdGKjtdUjtDtZn6ylGXFHW7smZV9ZqWvBP3nXOaCmMU54UmuOpuWD+tpsMo+Aj7bjF6hyOZz+UntDepSrnr6w6m7do72DPYItgBwC6DIRpAwEgwIys8S+0qp3KJWsSa0ybktefogFEVzhU7VVWAQeV0/kNpz1A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
 dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=intel.com;
Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17)
 by DS7PR11MB6176.namprd11.prod.outlook.com (2603:10b6:8:98::7) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.7159.23; Thu, 11 Jan 2024 09:48:37 +0000
Received: from DS0PR11MB7309.namprd11.prod.outlook.com
 ([fe80::4782:d54a:209d:cb49]) by DS0PR11MB7309.namprd11.prod.outlook.com
 ([fe80::4782:d54a:209d:cb49%7]) with mapi id 15.20.7159.020; Thu, 11 Jan 2024
 09:48:37 +0000
Date: Thu, 11 Jan 2024 09:48:33 +0000
From: Bruce Richardson <bruce.richardson@intel.com>
To: Morten =?iso-8859-1?Q?Br=F8rup?= <mb@smartsharesystems.com>
CC: Tyler Retzlaff <roretzla@linux.microsoft.com>, <dev@dpdk.org>
Subject: Re: [PATCH] build: fix linker warnings about undefined symbols
Message-ID: <ZZ-5cbv2HDhMhwp0@bricha3-MOBL.ger.corp.intel.com>
References: <20240110150103.529080-1-bruce.richardson@intel.com>
 <20240110165814.GA25069@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
 <98CBD80474FA8B44BF855DF32C47DC35E9F125@smartserver.smartshare.dk>
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F125@smartserver.smartshare.dk>
X-ClientProxiedBy: DUZPR01CA0047.eurprd01.prod.exchangelabs.com
 (2603:10a6:10:469::16) To DS0PR11MB7309.namprd11.prod.outlook.com
 (2603:10b6:8:13e::17)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DS7PR11MB6176:EE_
X-MS-Office365-Filtering-Correlation-Id: 6923488b-06d4-450b-7f05-08dc128a7bbf
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: BB2ZJk/7QH18n0HXaKcytbpORomtAFzGT8EaRYQYqQKuuUsLlAVjJgPxeeGlEfQ2/VFie8bxyfdA35ySpeS5BcvguVCqwXpclj9diHLItYAV02v6wJjKRnZSyzbUltzPNYb7kFGeMGmajGbR298apTca4NGfYgy6BqLVSj7kbsSUdFNTeKy58PbGuQPr763C4QYsW8A7TVflVEIFD9UUdPooTpnF8NaRpvq27KHT4Oknle3RcBfbQGiSw5VshJJ2Lt7eP9wdAcQc8WpUZCGGkTBiet/SZ5q+kC6v2AKtBaRBlSHbinA4o4FvoCwccl9vtuZQkvN3DSRKKX9mDhXA3N7RL3G+PKaTvhlki1rj1m547o5/E/IKWgLWFFYuS+PuG30sJ4hzo0Hbl5Hinvx+4xb+kFqHNu9H6G8jv/KAtmonZqj9XVFKedDGpc0ax03Xtg5Am6sHBIdTkCI1r/rG514nWmbTSHwb0s2U8lIrWNssNh6b21gEV1aM/7L6hHoW8eFOExoHRztjAAJYyr/tjgVRTBEVYo9sRlNCMzO5g+din1M4838myZIHLoD2QFjiC+aoXe57JR37cKtfRTKq9GnTEDtNaZS8fCPM0oDP/9qv/U7jAFHyMkGg5yJUNUqm
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(13230031)(366004)(376002)(396003)(346002)(39860400002)(136003)(230273577357003)(230173577357003)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(5660300002)(2906002)(41300700001)(66574015)(478600001)(6486002)(966005)(38100700002)(83380400001)(6506007)(6666004)(86362001)(6512007)(82960400001)(66556008)(8936002)(8676002)(66476007)(4326008)(66946007)(26005)(316002)(6916009)(44832011);
 DIR:OUT; SFP:1102; 
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?N8wElugBJxizlyC2C1SXplZAM477+icaXqPoVsjmHaNkPRRuS/uqhR40Z3?=
 =?iso-8859-1?Q?zFdtEajK5MojEbjLmjMmYUXW4I8oXyHZ+/RsJ4N0qIKeKf/NuCv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?iso-8859-1?Q?mBZ3ZPF1a4RZ+orpjajLYEhjpRAurgu6HrYbw4rSPaCfBO3iESOYBJRKQ3?=
 =?iso-8859-1?Q?4iWWJxBPs/qtilW9Wg3VgDZYzDoiIymOViLDuArs/IlW3eaUlscftKH4NE?=
 =?iso-8859-1?Q?tIWi0thlQ8hhaiG9PXMlOx2CTG8lgP49Dm2eXOMAaM5JbqMP6un+XsgDY7?=
 =?iso-8859-1?Q?853erxG7hFDZDrqITYiCT4/7dF6fyIBJWaYQQt+PzGsVGczrAwLF6yVuhC?=
 =?iso-8859-1?Q?tDTxZUFw3W/UX3hSINnXgQ9iAEi0ev/rhxYBn4N+47ziNu14YzbDp0V2qc?=
 =?iso-8859-1?Q?2pCJooEpYXKOpEHSVO9ZLkCbkFLa+k/PBJQg5Xc3A1xB4Byr1xvIrnnxhg?=
 =?iso-8859-1?Q?OZldg6W6+clZX4HvtyJxH525NBdy7Gujv1znXtkNDDkgyBdCV5Py22qXmy?=
 =?iso-8859-1?Q?NgAo0MKj17uoT7XluOBgfVN93jCelnmtRkk0N7epnjWyh4PIyDaqNVYewV?=
 =?iso-8859-1?Q?6On8aUNIH1WD5Oyt2Jpc75OO47k5uK3zVhY16scv/FDxt5RurGTqZIYi/o?=
 =?iso-8859-1?Q?ljYJnipVcEwjbdRs8HmRNIckkjZ6uM4GCfxxWzGhbsagprQiE88Mc/ydRM?=
 =?iso-8859-1?Q?iHxHqWOPra9tq7nWq/MfOgAlLfPOawGdo+XoIiUNfs7aqLQTGBo8in5q9H?=
 =?iso-8859-1?Q?fG45NpcUGqD0afD5GfkjUWgB8518ik8TtTDgytaUZfafbP8HJg7DxqTQ?=
 =?iso-8859-1?Q?=3D=3D?=
X-MS-Exchange-CrossTenant-Network-Message-Id: 6923488b-06d4-450b-7f05-08dc128a7bbf
X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2024 09:48:37.2832 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: QFGSWHAK+K1Za1kG2FfbXSsD+QX6RBLdf7KoY1TaAm919VgMgUycpm2ZQDq/ODIV4aQZWV3lfBwwTRhvcbynhsrW2mxbwSL4ZFNkMufnyVM=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6176
X-OriginatorOrg: intel.com
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Thu, Jan 11, 2024 at 10:38:05AM +0100, Morten Brørup wrote:
> > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com]
> > Sent: Wednesday, 10 January 2024 17.58
> > 
> > On Wed, Jan 10, 2024 at 03:01:03PM +0000, Bruce Richardson wrote:
> > > The default behaviour of "ld.lld" has changed, so it now prints out
> > > warnings about entries in the version.map file which don't exist in
> > > the current build. Since we use our version.map file simply to filter
> > > out the functions we don't want made public, we include in it all
> > > functions across all OS's and builds that we want public if present.
> > > This causes these ld warnings to be emitted, e.g. on BSD, which is
> > > missing functionality found on Linux. For example:
> > >
> > > * hpet functions in EAL
> > > * regexdev enqueue and dequeue burst
> > > * eventdev event_timer functions
> > >
> > > Easiest solution, without major rework of how we use our version.map
> > > files, and without dynamically generating them per-build, is to pass
> > > the --undefined-version flag to the linker, to restore the old
> > > behaviour.
> > >
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > ---
> > 
> > Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> > 
> > i don't know if has ever been discussed but a way to achieve a similar
> > outcome would be to introduce a visibility macro allowing the data and
> > function symbols to be explicitly made visible while making the build
> > default hidden.
> > 
> > https://gcc.gnu.org/wiki/Visibility
> 
> This looks interesting!
> Declaring a function "public" directly in its header seems much simpler to manage than having to add it to the version.map file too.
> 
> I wonder if function versioning is still supported if using this instead of version.map files?
> Of if there are other relevant reasons for continuing to use the version.map files instead of this?
> 

I don't see in that wiki page and details of how to mark symbols with
different ABI versions. For example, as well as listing what functions are
public, our version.map files also identify the ABI version (e.g. DPDK_24)
they belong to, or whether they are experimental or internal. Having them
all in the version file also makes it easy to see how many experimental
functions we have in each component.

/Bruce