From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C333643E00; Fri, 5 Apr 2024 13:09:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB9D9402E3; Fri, 5 Apr 2024 13:09:40 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id CC087402D4 for ; Fri, 5 Apr 2024 13:09:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712315379; x=1743851379; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=VzjBLYKoS4n0MAYmpcej8HDcq4gDdYLmkH3ruUi7Wrw=; b=Ff505D4/Z8bnDAXWNhaYh1iewF/FEiGGZci4MDpy+MZbUdHhlpEDVOBv XX+IdV75QiCqSk9TkwJ47FJLa2V9cThSBHL0HP81JKiaGAYk55z7lAGAS gIrhfxM8XoK46SiplaBXmOuA2rZU3BWRgZVIYXa9h1Prdj0ik72CbBm+z hDfnWqlTI2/a7wGB/Z9oSzmDJRReJYHBpZVd5xiEPFgfgCy06fZKe19qT kq21CslrB2ewv+wI69prjr24GxwI/Q6aTZDpegT+Mk44a+ZWQBI98aiNN XOgcy4N3NGBk5a0k6IpgVxfh8hOPrXHOO6AiosKeYDn2BTxfo9PvLih8b Q==; X-CSE-ConnectionGUID: F7JDRcxVSHGO8lQliQEjMA== X-CSE-MsgGUID: Yv3RL0q5TvmWoksy1CQelA== X-IronPort-AV: E=McAfee;i="6600,9927,11034"; a="25081257" X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="25081257" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2024 04:09:38 -0700 X-CSE-ConnectionGUID: wE/tSjlrTtehKbiXWh/bZA== X-CSE-MsgGUID: Ft4iX0I0RBK9XFyMiv4JjA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="23773056" Received: from sbrzez.igk.intel.com ([10.211.11.150]) by fmviesa004.fm.intel.com with ESMTP; 05 Apr 2024 04:09:37 -0700 From: Sebastian Brzezinka To: dev@dpdk.org Cc: Tomasz Zawadzki , Sebastian Brzezinka Subject: [PATCH] pmdinfogen: avoid empty string in ELFSymbol() Date: Fri, 5 Apr 2024 13:09:29 +0200 Message-Id: <20240405110929.3279775-1-sebastian.brzezinka@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Tomasz Zawadzki 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 Signed-off-by: Sebastian Brzezinka --- 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.