From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 6505AA0AC5 for ; Mon, 27 May 2019 16:14:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 15A6A137D; Mon, 27 May 2019 16:14:07 +0200 (CEST) Received: from mail-vk1-f193.google.com (mail-vk1-f193.google.com [209.85.221.193]) by dpdk.org (Postfix) with ESMTP id 761CFA49 for ; Mon, 27 May 2019 16:14:05 +0200 (CEST) Received: by mail-vk1-f193.google.com with SMTP id j4so3846622vke.11 for ; Mon, 27 May 2019 07:14:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4RcfkntiZmP3mlsJMBsshaC/rQ+B2rIi8kc5T8XtMNk=; b=d6uhqAe5atpa7tFfHJ9PjJcIFe7fURsaPDOqTyjKcvNiwOd8643kW2upDoRiCrHYB3 /248L/Ain+Wf+C5yAOvt58PIFyDTtir3uTnArj4GMM5MUZxgKTewbG/XVUtRfaGSLwLl k5ZHuTL5Xnc20i4HqAkfDqQcaIRiFp60AJAdCMvpMXKc1EdqH3oV71+9+rMuyV+8bChb ZR8M2K42kR+mPI9UdiIpZ8Yc94NHRRIk8xT19LIGnAo3S1O/FxW+afynYRBKkFrn2G0q py8y+fvX/63vD70ThOVnxW8KMaR3X8T92xaEyXlFr6bzgzeY441UK/ssBrIknZgXxJEx bIqQ== X-Gm-Message-State: APjAAAVnTYXwFqjLDB0RJGQ1Cvi0zenmHYI+eDVsd13cfhdvIgQLVhL3 i+kvd50eJPMTnF3yu7YXF7S2vaMeaGXEp+eKfxx8Sw== X-Google-Smtp-Source: APXvYqwHxGBu5T7NQUAOH8jSuijqRO5s772Od5P7NQ1t9ZYv79HCdxkoor7onpgLYjiGn9i6qt4zu209OZ41axEEl9Q= X-Received: by 2002:a1f:43d3:: with SMTP id q202mr19270699vka.85.1558966444794; Mon, 27 May 2019 07:14:04 -0700 (PDT) MIME-Version: 1.0 References: <20190410134517.63896-1-bruce.richardson@intel.com> In-Reply-To: <20190410134517.63896-1-bruce.richardson@intel.com> From: David Marchand Date: Mon, 27 May 2019 16:13:53 +0200 Message-ID: To: Bruce Richardson Cc: "Ananyev, Konstantin" , Aaron Conole , dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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" Hello, On Wed, Apr 10, 2019 at 3:45 PM Bruce Richardson wrote: > 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.] > > Was there something preventing this patchset from getting merged ? -- David Marchand