[PATCH v3] buildtools: fix invalid symbols
Mingjin Ye
mingjinx.ye at intel.com
Fri Jul 5 10:25:50 CEST 2024
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 at dpdk.org
Signed-off-by: Mingjin Ye <mingjinx.ye at intel.com>
---
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
More information about the dev
mailing list