libpci.a static library contains symver section

Bug #1831743 reported by Jiaxun Yang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pciutils (Ubuntu)
Confirmed
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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pciutils (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.