DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: Tyler Retzlaff <roretzla@linux.microsoft.com>, <dev@dpdk.org>
Subject: Re: [PATCH] build: fix linker warnings about undefined symbols
Date: Thu, 11 Jan 2024 09:48:33 +0000	[thread overview]
Message-ID: <ZZ-5cbv2HDhMhwp0@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F125@smartserver.smartshare.dk>

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

  reply	other threads:[~2024-01-11  9:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10 15:01 Bruce Richardson
2024-01-10 16:58 ` Tyler Retzlaff
2024-01-11  9:38   ` Morten Brørup
2024-01-11  9:48     ` Bruce Richardson [this message]
2024-01-12 20:11       ` Tyler Retzlaff
2024-01-12 20:49         ` Morten Brørup
2024-01-12 22:22           ` Stephen Hemminger
2024-01-15  8:56           ` David Marchand
2024-01-15 16:17             ` Tyler Retzlaff
2024-02-18 17:38   ` Thomas Monjalon
2024-02-20 17:02     ` Tyler Retzlaff

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=ZZ-5cbv2HDhMhwp0@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=roretzla@linux.microsoft.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).