From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 793B6C28CC5 for ; Wed, 5 Jun 2019 14:41:34 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 86A8820693 for ; Wed, 5 Jun 2019 14:41:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="NNvVs/2G"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="paIFiU3i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86A8820693 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 695CF1BAD7; Wed, 5 Jun 2019 16:41:32 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id EA94A1BACA for ; Wed, 5 Jun 2019 16:41:30 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D87333E6; Wed, 5 Jun 2019 10:41:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 05 Jun 2019 10:41:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=dH+NS3dVs2INPYwz5yp7EPGIrEnTV/uxlG/lPu837uM=; b=NNvVs/2GnLff ZREAg3NlGxrTYyZFPYOJgptr09YeLwWdm1Q2mfhqTN9MX3VRIIlTIwymy7LYcEeo yDUOn1DQsCZ63TfcxjhZndGCYYYBNf5jSZZmcaXwMJ9bwcIzlFvAfXW8KS56G3Ls Xb/wnt8Xa9fAB6CXIuzn9kvMNEEfvIM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=dH+NS3dVs2INPYwz5yp7EPGIrEnTV/uxlG/lPu837 uM=; b=paIFiU3inwvP734Ain0qxkwFkR47HzXoCAyeB6uhHgDSoRbUz8IPJeGur 0o4yGqY+gPHjVQQODo78JEs9BVASYE/OXFE3nJ1+nkts0qknWBp0GJ1Ze62w/U3J 99pfmXVzAUnXYh0qMcrXTFM6Pez4foXjbL0kDXOTdsBG53bbgDjUir4WxyvGG2fS lzPNxYO1DBBzEUo+tEewCLETFbrrMmNIYlOo+5VdJ0/lp3wc6E7ys3I3l/+MzZrV Pzllb2oKEot1+Dm7u6r1hjVfa4EgZ9eTqPUHo3y9SBPR10fLXGXEwSiu6mfp9Jvu Spwsl+41Nu/c/I+d6FrSvviXl829A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudegvddgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 25328380089; Wed, 5 Jun 2019 10:41:27 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, konstantin.ananyev@intel.com, aconole@redhat.com Date: Wed, 05 Jun 2019 16:41:25 +0200 Message-ID: <1667240.nEyWy9ANPa@xps> In-Reply-To: <20190410134517.63896-1-bruce.richardson@intel.com> References: <20190410134517.63896-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 0/2] remove use of weak functions from libraries X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 10/04/2019 15:45, Bruce Richardson: > Weak functions don't work well with static library builds as the linker > always picks the first version of a function irrespective of whether it is > weak or not. The solution to this is to use the "whole-archive" flag when > linking, but this has the nasty side-effect that it causes the resulting > binary to be larger than it needs to be. > > > A further problem with this approach of using "whole-archive" is that one > either needs to link all libraries with this flag or track what libraries > need it or not - the latter being especially a problem for apps not using > the DPDK build system itself (i.e. most apps not shipped with DPDK itself). > For meson builds this information needs to make its way all the way through > to the pkgconfig file generated - not a trivial undertaking. > > Thankfully, though, the use of weak functions is limited to use for > multiple functions within a single library, meaning that when the lib is > being built, the build system itself can know whether the "weak" function > is needed or not. This allows us to change the weak function to a > conditionally compiled regular function used in fallback case. This makes > the need for "whole-archive" flag, and any special linking measures for the > library, go away. > > [This set does not touch the drivers, only the libraries, since there are > other special linker flags needed for drivers in general, making the > problem less severe for driver .a files.] > > Bruce Richardson (2): > acl: remove use of weak functions > bpf: remove use of weak functions Applied, thanks