libpci.a static library contains symver section

Bug #1831743 reported by Jiaxun Yang on 2019-06-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pciutils (Ubuntu)
Undecided
Unassigned

Bug Description

When linking program statically with libpci.a, it reported:
ld.lld: error: /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/libpci.a(access.o): symbol pci_fill_info@@LIBPCI_3.3 has undefined version LIBPCI_3.3
ld.lld: error: /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/libpci.a(access.o): symbol pci_fill_info@LIBPCI_3.0 has undefined version LIBPCI_3.0
ld.lld: error: /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/libpci.a(access.o): symbol pci_fill_info@LIBPCI_3.1 has undefined version LIBPCI_3.1
ld.lld: error: /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/libpci.a(access.o): symbol pci_fill_info@LIBPCI_3.2 has undefined version LIBPCI_3.2

However, static library should not contain versioning information(symver section).

objdump showed these symbols:
00000000000004f0 g F .text 0000000000000054 pci_fill_info@LIBPCI_3.0
00000000000004f0 g F .text 0000000000000054 pci_fill_info@LIBPCI_3.1
00000000000004f0 g F .text 0000000000000054 pci_fill_info@LIBPCI_3.2
00000000000004f0 g F .text 0000000000000054 pci_fill_info@@LIBPCI_3.3

Probably PCI_SHARED_LIB is defined in static build. This issue existed in all Ubuntu releases.

Thanks.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers