else
CFLAGS += -fPIC -fvisibility=hidden
$(PCILIB): $(addsuffix .o,$(OBJS))
- $(CC) -shared $(SONAME) -o $@ $^ $(LIB_LDLIBS)
+ $(CC) -shared $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS)
endif
$(PCILIBPC): libpci.pc.in
--- /dev/null
+/* Version script for the libpci */
+
+/*
+ * Visibility declarations in the source take precedence over this script,
+ * so we can boldly declare pci_* as public and still keep the internal
+ * functions properly hidden.
+ */
+
+LIBPCI_2.2.99 {
+ global: pci_*;
+ local: *;
+};