Package: db5.3 / 5.3.28-12+deb9u1

002-versioned_symbols.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- db5.3.orig/dist/Makefile.in
+++ db5.3/dist/Makefile.in
@@ -855,9 +855,15 @@ $(libdb_version): $(C_OBJS)
 	$(RM) $(libdb)
 	$(LN) -s $(libdb_version) $(libdb)
 
+Versions: $(C_OBJS)
+	rm -f $@
+	printf "DB5_3 {\n  global:\n" > $@
+	nm $$(sed -n "/^pic_object='\(.*\)'$$/ { s//\1/;s,.libs/,,;p;}" $(C_OBJS)) | grep " [DTR] " | cut -d" " -f3 | sed -e 's/$$/;/' >> $@
+	printf "local: *; };\n" >> $@
+
 # Shared C library.
-$(libso_target): $(C_OBJS)
-	$(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
+$(libso_target): $(C_OBJS) Versions
+	$(SOLINK) $(SOFLAGS) -Wl,--version-script=Versions $(LDFLAGS) -o $@ $(C_OBJS) \
 		$(LIBCSO_LIBS)
 	$(RM) $(libdb)
 	$(LN) -s .libs/$(libdb_version) $(libdb)