aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--libcryptech-pkcs11.map6
2 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 95fce05..0eb86e3 100644
--- a/Makefile
+++ b/Makefile
@@ -179,9 +179,7 @@ ifeq "${UNAME}" "Darwin"
else
${SONAME}: pkcs11.o ${LIBS}
- ${CC} ${CFLAGS} -shared -o $@.tmp $^ ${SOFLAGS} ${LDFLAGS}
- ${OBJCOPY} -w -G 'C_*' $@.tmp $@
- rm -f $@.tmp
+ ${CC} ${CFLAGS} -Wl,--version-script=libcryptech-pkcs11.map -shared -o $@ $^ ${SOFLAGS} ${LDFLAGS}
endif
diff --git a/libcryptech-pkcs11.map b/libcryptech-pkcs11.map
new file mode 100644
index 0000000..11c3036
--- /dev/null
+++ b/libcryptech-pkcs11.map
@@ -0,0 +1,6 @@
+LIBCRYPTECH_PKCS11_2.0 {
+ global:
+ C_*;
+ local:
+ *;
+};