From: Pali Rohár Date: Sun, 8 May 2022 08:52:35 +0000 (+0200) Subject: libpci: Do not call unversioned symbols from libpci itself X-Git-Tag: v3.9.0~17^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26a64f917656453051d200cc7bf87710a0bfcef7;p=thirdparty%2Fpciutils.git libpci: Do not call unversioned symbols from libpci itself Windows version of GNU LD has bugs which cause that linker would translate this unknown unversioned symbols to some random version. So change pci_fill_info() to pci_fill_info_v38() in lib/filter.c to ensure that last version of this function would be used also by Windows version of GNU LD linker. Before this change GNU LD translated this function call to symbol _pci_fill_info@LIBPCI_3.0. After this change GNU LD translate it to _pci_fill_info@LIBPCI_3.8. --- diff --git a/lib/filter.c b/lib/filter.c index b881b6b..2abb631 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -204,13 +204,13 @@ pci_filter_match_v38(struct pci_filter *f, struct pci_dev *d) } if (f->device_class >= 0) { - pci_fill_info(d, PCI_FILL_CLASS); + pci_fill_info_v38(d, PCI_FILL_CLASS); if ((f->device_class ^ d->device_class) & f->device_class_mask) return 0; } if (f->prog_if >= 0) { - pci_fill_info(d, PCI_FILL_CLASS_EXT); + pci_fill_info_v38(d, PCI_FILL_CLASS_EXT); if (f->prog_if != d->prog_if) return 0; }