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 E7B0545594; Fri, 5 Jul 2024 10:49:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D0534335D; Fri, 5 Jul 2024 10:49:00 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mails.dpdk.org (Postfix) with ESMTP id DBCAC4027E; Fri, 5 Jul 2024 10:48:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1720169339; x=1751705339; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5/0FrAZmHU6g6cDGugdd7cDhNygrKw7QFUYgz/UB+aY=; b=aLyXAOUTFjDU16jwJ9i+c+FXLDL6aKXCmSx1co4wEKAQTYmUpX56FfH2 4t4Raot4Y/3reQ1UrXAQsxE4f8WBGVolbZE7NZRv9LLshAUHuuEixltA2 DWEU2WttkHXD0Kyg9EbiXHrFvfCVrLGg/ytAHVtKjgW/bbUDjvBvBGMTW IEJ44B6UqRScqOgkzNOpxhyqHE+snnFm0y+xr1LAxERE8rtG/7MKs6q1n +woA1G+wbdHq155dylrIacMReP5kjv87pd72uQWsYO2RqCsJPfKbEtkVQ houqjE+stjYPOcE8N0VBIKJL/G0feD1yMJteANa2xJALhasjikuGDaEyQ A==; X-CSE-ConnectionGUID: 32/8xdLTTGiWv7ceZE8Qpg== X-CSE-MsgGUID: LcJIWdOYQfGX/lKerL5/eQ== X-IronPort-AV: E=McAfee;i="6700,10204,11123"; a="17407517" X-IronPort-AV: E=Sophos;i="6.09,184,1716274800"; d="scan'208";a="17407517" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2024 01:48:58 -0700 X-CSE-ConnectionGUID: crufhmgjSMq+I2v4SWqWbA== X-CSE-MsgGUID: btBHyVJjSK+vOsTjLmQIdg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,184,1716274800"; d="scan'208";a="46712804" Received: from unknown (HELO localhost.localdomain) ([10.239.252.253]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2024 01:48:56 -0700 From: Mingjin Ye To: dev@dpdk.org Cc: david.marchand@redhat.com, alialnu@nvidia.com, Mingjin Ye , stable@dpdk.org, Dmitry Kozlyuk Subject: [PATCH v3] buildtools: fix invalid symbols Date: Fri, 5 Jul 2024 08:25:50 +0000 Message-Id: <20240705082550.1670765-1-mingjinx.ye@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240701103315.835249-1-mingjinx.ye@intel.com> References: <20240701103315.835249-1-mingjinx.ye@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 In scenarios where a higher clang compiler is used and ASAN is enabled, the generated ELF file will additionally insert undefined debug symbols with the same prefix. This causes duplicate C code to be generated. This patch fixes this issue by skipping the unspecified symbol type. Fixes: 6c4bf8f42432 ("buildtools: add Python pmdinfogen") Cc: stable@dpdk.org Signed-off-by: Mingjin Ye --- buildtools/pmdinfogen.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py index 2a44f17bda..9896f107dc 100755 --- a/buildtools/pmdinfogen.py +++ b/buildtools/pmdinfogen.py @@ -70,6 +70,9 @@ def find_by_prefix(self, prefix): prefix = prefix.encode("utf-8") if self._legacy_elftools else prefix for i in range(self._symtab.num_symbols()): symbol = self._symtab.get_symbol(i) + # Skip unspecified symbol type + if symbol.entry.st_info['type'] == "STT_NOTYPE": + continue if symbol.name.startswith(prefix): yield ELFSymbol(self._image, symbol) -- 2.25.1