From 3d6b5e9c60fde962d2bf5ba86e1bb6f569763f61 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 18 Feb 2008 21:31:41 +0100 Subject: [PATCH] Added symbol versioning to the shared library. --- lib/Makefile | 2 +- lib/libpci.ver | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 lib/libpci.ver diff --git a/lib/Makefile b/lib/Makefile index 1ce2398..acbd420 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -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 index 0000000..708fc4a --- /dev/null +++ b/lib/libpci.ver @@ -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: *; +}; -- 2.39.2