DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	Aaron Conole <aconole@redhat.com>, dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 0/2] remove use of weak functions from libraries
Date: Mon, 27 May 2019 16:41:21 +0100	[thread overview]
Message-ID: <20190527154121.GA429@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <CAJFAV8ysd541icrJGsPXf=eSLsaiNAy3v2KVpMRoj9==Vsrdvg@mail.gmail.com>

On Mon, May 27, 2019 at 04:13:53PM +0200, David Marchand wrote:
>    Hello,
>    On Wed, Apr 10, 2019 at 3:45 PM Bruce Richardson
>    <[1]bruce.richardson@intel.com> 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
> 
I believe Aaron Conole had some changes in the same area and was looking to
roll these changes into a bigger patchset of his. Aaron, can you please
confirm?

/Bruce

  reply	other threads:[~2019-05-27 15:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 13:45 Bruce Richardson
2019-04-10 13:45 ` Bruce Richardson
2019-04-10 13:45 ` [dpdk-dev] [PATCH 1/2] acl: remove use of weak functions Bruce Richardson
2019-04-10 13:45   ` Bruce Richardson
2019-04-10 13:54   ` Aaron Conole
2019-04-10 13:54     ` Aaron Conole
2019-04-10 14:02     ` Bruce Richardson
2019-04-10 14:02       ` Bruce Richardson
2019-04-10 14:08       ` Aaron Conole
2019-04-10 14:08         ` Aaron Conole
2019-04-10 14:57   ` Ananyev, Konstantin
2019-04-10 14:57     ` Ananyev, Konstantin
2019-04-10 13:45 ` [dpdk-dev] [PATCH 2/2] bpf: " Bruce Richardson
2019-04-10 13:45   ` Bruce Richardson
2019-04-10 14:07   ` Aaron Conole
2019-04-10 14:07     ` Aaron Conole
2019-04-10 14:27     ` Bruce Richardson
2019-04-10 14:27       ` Bruce Richardson
2019-04-10 14:57   ` Ananyev, Konstantin
2019-04-10 14:57     ` Ananyev, Konstantin
2019-05-27 14:13 ` [dpdk-dev] [PATCH 0/2] remove use of weak functions from libraries David Marchand
2019-05-27 15:41   ` Bruce Richardson [this message]
2019-05-27 20:57     ` Aaron Conole
2019-05-28  8:06       ` Bruce Richardson
2019-06-05 14:41 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190527154121.GA429@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=aconole@redhat.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).