From: simon75j Date: Mon, 31 Aug 2009 05:59:52 +0000 (+0000) Subject: Use linker version script. X-Git-Tag: yubikey-personalisation_0.97-1~13 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcc685c8cd48ef70c69802684dc5e700c17c668d;p=yubikey-personalization.old Use linker version script. git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@169 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- diff --git a/Makefile.am b/Makefile.am index 7a13049..6d8b468 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 d3739c6..027ab57 100644 --- 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 . + ** ykpersonalize: Make -h work even if there is no yubikey present. Suggested by Peter Hultqvist . diff --git a/configure.ac b/configure.ac index fc2e5c6..ec48b1c 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 0000000..f7c8443 --- /dev/null +++ b/libykpers-1.map @@ -0,0 +1,90 @@ +# Written by Simon Josefsson . +# 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: + *; +};