[PATCH] buildtools: fix invalid symbols
Bruce Richardson
bruce.richardson at intel.com
Thu Jun 27 12:50:56 CEST 2024
On Thu, Jun 27, 2024 at 10:11:44AM +0000, Mingjin Ye wrote:
> ELF files generated by higher version compilers wrap multiple
> symbols prefixed with "this_pmd_name".
>
> This patch fixes the issue by filtering invalid symbols.
>
> Bugzilla ID: 1466
> 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, 2 insertions(+), 1 deletion(-)
>
> diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py
> index 2a44f17bda..6ea97caec7 100755
> --- a/buildtools/pmdinfogen.py
> +++ b/buildtools/pmdinfogen.py
> @@ -200,7 +200,8 @@ def dump(self, file):
> def load_drivers(image):
> drivers = []
> for symbol in image.find_by_prefix("this_pmd_name"):
> - drivers.append(Driver.load(image, symbol))
> + if len(symbol.string_value) != 0:
> + drivers.append(Driver.load(image, symbol))
One small suggestion. Empty strings evaluate to boolean false, so the
condition can just be simplified to:
if symbol.string_value:
drivers.append(....)
/Bruce
More information about the dev
mailing list