[gnutls-dev] Re: gnutls 1.0.22
Joe Orton
joe at manyfish.co.uk
Thu Oct 28 20:21:46 CEST 2004
On Thu, Oct 28, 2004 at 03:11:22PM +0200, Simon Josefsson wrote:
> Joe Orton <joe at manyfish.co.uk> writes:
>
> > On Thu, Oct 28, 2004 at 12:49:42PM +0200, Simon Josefsson wrote:
> >> Hello. Similar bug fixes as in 1.1.21.
> >
> > Thanks for the releases Simon!
> >
> > I noticed that GNU TLS is using hand-crafted symbol version scripts for
> > GNU ld -- did you know that using libtool's -export-symbols{,-regex}
> > flags can be used to the same in a portable fashion? It's rather neat.
>
> I am not that familiar with these features, I thought they all were
> inherently unportable. Not that it means they shouldn't be used, of
> course, since they are useful for GNU systems.
It's supported on at least Solaris and AIX as well as with GNU ld; and
libtool just ignores it on platforms where it's not supported, so it's
OK.
> Further thoughts on this? Or preferably, specific patches...
Patch below. Attached list of symbols which get hidden in libgnutls.so
with this applied vs not using it at all, for verification: some of
these should probably get namespace-protected for systems on which
-export-symbols* isn't implemented: memmem, firstElement, bit_mask for
instance.
Index: configure.in
===================================================================
RCS file: /cvs/gnutls/gnutls/configure.in,v
retrieving revision 2.329
diff -u -r2.329 configure.in
--- configure.in 27 Oct 2004 21:29:32 -0000 2.329
+++ configure.in 28 Oct 2004 18:12:44 -0000
@@ -474,26 +474,6 @@
])
AM_PROG_LIBTOOL
-dnl This is after AM_PROG_LIBTOOL so that the LD variable
-dnl has been set.
-
-AC_MSG_CHECKING([whether we have GNU ld or compatible])
-
-GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
-if test "$GLD"; then
-have_ld_version_script=yes
- AC_MSG_RESULT(yes)
-else
-have_ld_version_script=no
- AC_MSG_RESULT(no)
-AC_MSG_WARN(***
-*** You may want to rerun configure using --with-gnu-ld to enable versioned symbols.
-)
-fi
-
-AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
-
-
LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBTASN1_LIBS $LIBGCRYPT_LIBS $LIBS"
LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS -I${includedir}"
Index: lib/Makefile.am
===================================================================
RCS file: /cvs/gnutls/gnutls/lib/Makefile.am,v
retrieving revision 2.148
diff -u -r2.148 Makefile.am
--- lib/Makefile.am 24 Oct 2004 14:12:08 -0000 2.148
+++ lib/Makefile.am 28 Oct 2004 18:12:44 -0000
@@ -9,11 +9,7 @@
pkgconfig_DATA = gnutls.pc
DISTCLEANFILES = $(pkgconfig_DATA)
-if HAVE_LD_VERSION_SCRIPT
- libgnutls_version_script_cmd = -Wl,--version-script=$(srcdir)/libgnutls.vers
-else
- libgnutls_version_script_cmd =
-endif
+LIBGNUTLS_EXPORTS = -export-symbols-regex '^(_gnutls|gnutls|_E_).*'
DIST_SUBDIRS = minitasn1 x509
if ENABLE_MINITASN1
@@ -79,7 +75,7 @@
libgnutls_la_LDFLAGS = $(LIBTASN1_LIBS) $(LIBGCRYPT_LIBS) \
../crypto/libgc.la \
- $(libgnutls_version_script_cmd) \
+ $(LIBGNUTLS_EXPORTS) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
pkix_asn1_tab.c: pkix.asn
Index: libextra/Makefile.am
===================================================================
RCS file: /cvs/gnutls/gnutls/libextra/Makefile.am,v
retrieving revision 1.51
diff -u -r1.51 Makefile.am
--- libextra/Makefile.am 24 Oct 2004 14:12:09 -0000 1.51
+++ libextra/Makefile.am 28 Oct 2004 18:12:44 -0000
@@ -10,11 +10,7 @@
pkgconfig_DATA = gnutls-extra.pc
DISTCLEANFILES = $(pkgconfig_DATA)
-if HAVE_LD_VERSION_SCRIPT
- libgnutls_extra_version_script_cmd = -Wl,--version-script=$(srcdir)/libgnutls-extra.vers
-else
- libgnutls_extra_version_script_cmd =
-endif
+LIBGNUTLS_EXTRA_EXPORTS = -export-symbols-regex '^gnutls.*'
EXTRA_DIST = libgnutls-extra.vers \
openssl_compat.h gnutls-extra-api.texi \
@@ -70,7 +66,7 @@
gnutls_extra.c
-libgnutls_extra_la_LDFLAGS = $(libgnutls_extra_version_script_cmd) \
+libgnutls_extra_la_LDFLAGS = $(LIBGNUTLS_EXTRA_EXPORTS) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
$(LIBOPENCDK_LIBS) $(LZO_LIBS)
-------------- next part --------------
anon_auth_struct
_asn1_add_node
_asn1_add_node_only
_asn1_append_sequence_set
asn1_array2tree
_asn1_bit_der
_asn1_change_integer_value
_asn1_check_identifier
asn1_check_version
_asn1_complete_explicit_tag
_asn1_convert_integer
_asn1_copy_structure2
_asn1_copy_structure3
asn1_create_element
_asn1_create_static_structure
asn1_delete_element
_asn1_delete_list
_asn1_delete_list_and_nodes
_asn1_delete_not_used
asn1_delete_structure
asn1_der_coding
asn1_der_decoding
asn1_der_decoding_element
asn1_der_decoding_startEnd
_asn1_error_description_tag_error
_asn1_error_description_value_not_found
asn1_expand_any_defined_by
_asn1_expand_identifier
_asn1_expand_object_id
asn1_expand_octet_string
_asn1_extract_tag_der
_asn1_find_left
_asn1_find_node
asn1_find_structure_from_oid
_asn1_find_up
_asn1_get_bit_der
_asn1_get_down
_asn1_get_indefinite_length_string
_asn1_get_last_right
_asn1_get_length_der
_asn1_get_name
_asn1_get_objectid_der
_asn1_get_octet_der
_asn1_get_octet_string
_asn1_get_right
_asn1_get_tag_der
_asn1_get_time_der
_asn1_hierarchical_name
_asn1_identifierMissing
_asn1_insert_tag_der
_asn1_length_der
_asn1_ltostr
_asn1_mem_cpy
_asn1_mod_type
asn1_number_of_elements
_asn1_objectid_der
_asn1_octet_der
_asn1_ordering_set
_asn1_ordering_set_of
asn1_print_structure
asn1_read_tag
asn1_read_value
_asn1_remove_node
_asn1_set_default_tag
_asn1_set_down
_asn1_set_name
_asn1_set_right
_asn1_set_value
_asn1_str_cat
_asn1_str_cpy
_asn1_tag_der
_asn1_time_der
_asn1_type_choice_config
_asn1_type_set_config
asn1_write_value
bit_mask
__bss_start
dhe_dss_auth_struct
dhe_rsa_auth_struct
_edata
_end
_fini
firstElement
gc_cipher_close
gc_cipher_decrypt_inline
gc_cipher_encrypt_inline
gc_cipher_open
gc_cipher_setiv
gc_cipher_setkey
gc_done
gc_hash_buffer
gc_hash_clone
gc_hash_close
gc_hash_digest_length
gc_hash_hmac_setkey
gc_hash_open
gc_hash_read
gc_hash_write
gc_hmac_md5
gc_hmac_sha1
gc_init
gc_md5
gc_nonce
gc_pkcs5_pbkdf2_sha1
gc_pseudo_random
gc_random
gc_set_allocators
_init
libtasn1_perror
libtasn1_strerror
memmem
_pkcs12_decode_crt_bag
_pkcs12_decode_safe_contents
_pkcs12_encode_crt_bag
_pkcs12_encode_safe_contents
_pkcs12_string_to_key
pkix_asn1_tab
rsa_auth_struct
rsa_export_auth_struct
srp_auth_struct
srp_dss_auth_struct
srp_rsa_auth_struct
More information about the Gnutls-dev
mailing list