]> mj.ucw.cz Git - pciutils.git/commitdiff
Added symbol versioning to the shared library.
authorMartin Mares <mj@ucw.cz>
Mon, 18 Feb 2008 20:31:41 +0000 (21:31 +0100)
committerMartin Mares <mj@ucw.cz>
Mon, 18 Feb 2008 20:31:41 +0000 (21:31 +0100)
lib/Makefile
lib/libpci.ver [new file with mode: 0644]

index 1ce23983a4f790404bc053e3b9f0fa7034779607..acbd420d2ee82810a4c677264bbdf7dd77a4427a 100644 (file)
@@ -52,7 +52,7 @@ $(PCILIB): $(addsuffix .o,$(OBJS))
 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
diff --git a/lib/libpci.ver b/lib/libpci.ver
new file mode 100644 (file)
index 0000000..708fc4a
--- /dev/null
@@ -0,0 +1,12 @@
+/* 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: *;
+};