DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
To: dev@dpdk.org
Cc: Tomasz Zawadzki <tomasz.zawadzki@intel.com>,
	Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Subject: [PATCH] pmdinfogen: avoid empty string in ELFSymbol()
Date: Fri,  5 Apr 2024 13:09:29 +0200	[thread overview]
Message-ID: <20240405110929.3279775-1-sebastian.brzezinka@intel.com> (raw)

From: Tomasz Zawadzki <tomasz.zawadzki@intel.com>

Starting with Clang 17 the list of pmds could
contain empty string. Please see:
https://bugs.dpdk.org/show_bug.cgi?id=1313

This is a fix proposed by alialnu@nvidia.com in the
issue above.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
 buildtools/pmdinfogen.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py
index 2a44f17bda..2b29872649 100755
--- a/buildtools/pmdinfogen.py
+++ b/buildtools/pmdinfogen.py
@@ -71,7 +71,9 @@ def find_by_prefix(self, prefix):
         for i in range(self._symtab.num_symbols()):
             symbol = self._symtab.get_symbol(i)
             if symbol.name.startswith(prefix):
-                yield ELFSymbol(self._image, symbol)
+                elf_symbol = ELFSymbol(self._image, symbol)
+                if elf_symbol.string_value:
+                    yield elf_symbol
 
 
 class COFFSymbol:
-- 
2.34.1

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.


             reply	other threads:[~2024-04-05 11:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 11:09 Sebastian Brzezinka [this message]
2024-04-05 11:31 ` David Marchand

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=20240405110929.3279775-1-sebastian.brzezinka@intel.com \
    --to=sebastian.brzezinka@intel.com \
    --cc=dev@dpdk.org \
    --cc=tomasz.zawadzki@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).