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: sta...@dpdk.org Signed-off-by: Mingjin Ye <mingjinx...@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