Add versioned symbols support
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..f7f21be
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,5 @@
+2005-07-25 Guillem Jover <guillem@debian.org>
+
+ * Versions: New file.
+ * Makefile: Add versioned symbols support.
+
diff --git a/Makefile b/Makefile
index c80e183..790a2d6 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,10 @@ $(LIB_SONAME): $(LIB_SHARED)
ln -fs $^ $@
$(LIB_SHARED): $(LIB_SHARED_OBJS)
- gcc -shared -Wl,-soname -Wl,$(LIB_SONAME) -o $@ $^
+ gcc -shared \
+ -Wl,-soname -Wl,$(LIB_SONAME) \
+ -Wl,--version-script=Versions \
+ -o $@ $^
install: libs
mkdir -p $(DESTDIR)/usr/lib/
diff --git a/Versions b/Versions
new file mode 100644
index 0000000..87cf983
--- /dev/null
+++ b/Versions
@@ -0,0 +1,10 @@
+LIBBSD_0.0 {
+ global:
+ arc4random;
+ fgetln;
+ inet_net_pton;
+ strlcpy;
+ strlcat;
+ local:
+ *;
+};