svn commit: r328263 - head/lib/libregex
Kyle Evans
kevans at FreeBSD.org
Mon Jan 22 18:40:21 UTC 2018
Author: kevans
Date: Mon Jan 22 18:40:19 2018
New Revision: 328263
URL: https://svnweb.freebsd.org/changeset/base/328263
Log:
libregex: Add a symbol map
kib points out that trying to re-use symbol versioning from libc is dirty
and wrong. The implementation in libregex is incompatible by design with the
implementation in libc. Using the symbol versions from libc can and likely
will cause confusions for linkers and bring unexpected behavior for
consumers that unwillingly (transitively) link against libregex.
Reported by: kib
Added:
head/lib/libregex/Symbol.map (contents, props changed)
head/lib/libregex/Versions.def (contents, props changed)
Modified:
head/lib/libregex/Makefile
Modified: head/lib/libregex/Makefile
==============================================================================
--- head/lib/libregex/Makefile Mon Jan 22 17:47:49 2018 (r328262)
+++ head/lib/libregex/Makefile Mon Jan 22 18:40:19 2018 (r328263)
@@ -9,8 +9,10 @@ SHLIB_MINOR= 0
CFLAGS+= -DLIBREGEX
LIBC_SRCTOP= ${.CURDIR:H}/libc
-SYMBOL_MAPS= ${SYM_MAPS}
WARNS?= 2
+
+VERSION_DEF= ${.CURDIR}/Versions.def
+SYMBOL_MAPS= ${.CURDIR}/Symbol.map
#HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
Added: head/lib/libregex/Symbol.map
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lib/libregex/Symbol.map Mon Jan 22 18:40:19 2018 (r328263)
@@ -0,0 +1,16 @@
+/*
+ * $FreeBSD$
+ */
+
+/*
+ * libregex uses a different version name because its symbols are not strictly
+ * compatible with those provided by libc. Re-using the version name from libc
+ * could cause linking headaches and make debugging more difficult than it needs
+ * to be.
+ */
+LIBREGEX_1.0 {
+ regcomp;
+ regerror;
+ regexec;
+ regfree;
+};
Added: head/lib/libregex/Versions.def
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lib/libregex/Versions.def Mon Jan 22 18:40:19 2018 (r328263)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+LIBREGEX_1.0 {
+};
+
More information about the svn-src-all
mailing list