]> err.no Git - yubikey-personalization.old/commitdiff
Use linker version script.
authorSimon Josefsson <simon@josefsson.org>
Mon, 31 Aug 2009 05:59:52 +0000 (05:59 +0000)
committerSimon Josefsson <simon@josefsson.org>
Mon, 31 Aug 2009 05:59:52 +0000 (05:59 +0000)
Makefile.am
NEWS
configure.ac
libykpers-1.map [new file with mode: 0644]

index 7a13049b9ce10410c8fd08d8b2c7ff3c510f4c6b..6d8b46875ebc15a97018077100bdf4e10357f83a 100644 (file)
@@ -44,7 +44,7 @@ libykpers_1_la_SOURCES = ykpers.c ykpbkdf2.h ykpbkdf2.c
 libykpers_1_la_SOURCES += rfc4634/hmac.c rfc4634/usha.c rfc4634/sha.h  \
        rfc4634/sha1.c rfc4634/sha224-256.c rfc4634/sha384-512.c        \
        rfc4634/sha-private.h
-libykpers_1_la_SOURCES += ykpers-1.pc.in
+libykpers_1_la_SOURCES += ykpers-1.pc.in libykpers-1.map
 libykpers_1_la_LIBADD = $(LTLIBYUBIKEY) ./ykcore/libykcore.la
 libykpers_1_la_LDFLAGS = -no-undefined \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
@@ -52,6 +52,12 @@ libykpers_1_la_LDFLAGS = -no-undefined \
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = ykpers-1.pc
 
+if HAVE_LD_VERSION_SCRIPT
+libykpers_1_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libykpers-1.map
+else
+libykpers_1_la_LDFLAGS += -export-symbols-regex '^(ykp|yk|ykds)_.*'
+endif
+
 # The command line tools.
 
 bin_PROGRAMS = ykpersonalize
diff --git a/NEWS b/NEWS
index d3739c6f0591cbae45e107209ebf0197b9b0e45e..027ab573260f7856f42c58f0f23881f64aae097e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ Yubikey-personalize NEWS -- History of user-visible changes.     -*- outline -*-
 
 * Version 0.97 (unreleased)
 
+** libykpers-1: Add linker version script.
+If linker scripts are not supported, fall back on Libtool
+-export-symbols-regex.  Suggested by Tollef Fog Heen <tfheen@err.no>.
+
 ** ykpersonalize: Make -h work even if there is no yubikey present.
 Suggested by Peter Hultqvist <peter.h@nsf.scout.se>.
 
index fc2e5c65ea435f904749ab5533e328262577463a..ec48b1c319e0694ba7b4139effae300b30199848 100644 (file)
@@ -100,6 +100,8 @@ if test x$with_backend = xosx; then
   LDFLAGS="$LDFLAGS -framework IOKit -framework CoreFoundation"
 fi
 
+gl_LD_VERSION_SCRIPT
+
 AC_CONFIG_FILES([
   Makefile
   ykpers-1.pc
diff --git a/libykpers-1.map b/libykpers-1.map
new file mode 100644 (file)
index 0000000..f7c8443
--- /dev/null
@@ -0,0 +1,90 @@
+# Written by Simon Josefsson <simon@yubico.com>.
+# Copyright (c) 2008, 2009 Yubico AB
+# All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# 
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+# 
+#     * Redistributions in binary form must reproduce the above
+#       copyright notice, this list of conditions and the following
+#       disclaimer in the documentation and/or other materials provided
+#       with the distribution.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+LIBYKPERS_1.0 {
+  global:
+# Functions:
+    yk_close_key;
+    yk_endian_swap_16;
+    yk_force_key_update;
+    yk_get_status;
+    yk_init;
+    yk_open_first_key;
+    yk_pbkdf2;
+    yk_read_from_key;
+    yk_release;
+    yk_strerror;
+    yk_usb_strerror;
+    yk_write_config;
+    yk_write_to_key;
+    ykds_alloc;
+    ykds_free;
+    ykds_pgm_seq;
+    ykds_static;
+    ykds_touch_level;
+    ykds_version_build;
+    ykds_version_major;
+    ykds_version_minor;
+    ykp_AES_key_from_hex;
+    ykp_AES_key_from_passphrase;
+    ykp_config_num;
+    ykp_configure_for;
+    ykp_core_config;
+    ykp_create_config;
+    ykp_free_config;
+    ykp_read_config;
+    ykp_set_access_code;
+    ykp_set_cfgflag_ALLOW_HIDTRIG;
+    ykp_set_cfgflag_MAN_UPDATE;
+    ykp_set_cfgflag_PACING_10MS;
+    ykp_set_cfgflag_PACING_20MS;
+    ykp_set_cfgflag_SEND_REF;
+    ykp_set_cfgflag_SHORT_TICKET;
+    ykp_set_cfgflag_STATIC_TICKET;
+    ykp_set_cfgflag_STRONG_PW1;
+    ykp_set_cfgflag_STRONG_PW2;
+    ykp_set_cfgflag_TICKET_FIRST;
+    ykp_set_fixed;
+    ykp_set_tktflag_APPEND_CR;
+    ykp_set_tktflag_APPEND_DELAY1;
+    ykp_set_tktflag_APPEND_DELAY2;
+    ykp_set_tktflag_APPEND_TAB1;
+    ykp_set_tktflag_APPEND_TAB2;
+    ykp_set_tktflag_PROTECT_CFG2;
+    ykp_set_tktflag_TAB_FIRST;
+    ykp_set_uid;
+    ykp_strerror;
+    ykp_write_config;
+
+# Variables:
+   _yk_errno_location;
+   _ykp_errno_location;
+
+  local:
+    *;
+};