Date: Thu, 21 Jul 2022 12:12:30 -0600 From: Kristof Provost <kp@FreeBSD.org> To: Kyle Evans <kevans@freebsd.org> Cc: rlinnemann@netgate.com, src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 000321bab7be - main - namespace nv names, version libnv and libnvpair library symbols Message-ID: <EE442161-2AA4-43B2-A152-BC28969A5B95@FreeBSD.org> In-Reply-To: <CACNAnaHXvfy%2B5=qHiSfXp0Ab8Qv3Wfp1hPJ1Y-f-_9SjYxp4nQ@mail.gmail.com> References: <202207211636.26LGaknt034375@gitrepo.freebsd.org> <CACNAnaHXvfy%2B5=qHiSfXp0Ab8Qv3Wfp1hPJ1Y-f-_9SjYxp4nQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21 Jul 2022, at 11:04, Kyle Evans wrote: > On Thu, Jul 21, 2022 at 9:36 AM Kristof Provost <kp@freebsd.org> wrote:= >> >> The branch main has been updated by kp: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D000321bab7bea3530408b96= 0095a6ea241451175 >> >> commit 000321bab7bea3530408b960095a6ea241451175 >> Author: Reid Linnemann <rlinnemann@netgate.com> >> AuthorDate: 2022-05-17 19:49:41 +0000 >> Commit: Kristof Provost <kp@FreeBSD.org> >> CommitDate: 2022-07-21 16:35:23 +0000 >> >> namespace nv names, version libnv and libnvpair library symbols >> >> libnv and libnvpair have aliased symbols, and as a result a single= process which >> dlopens a shared object that is dynamically linked to libnv and an= other to >> libnvpair will wind up with a single set of resolved symbols for t= hose in >> conflict. A source file also cannot include both libnv and libnvpa= ir headers >> because of aliased identifiers. To resolve the situation, libnv ty= pes and >> functions are namespaced via nv_namespace.h, and libnv symbols are= >> versioned. The msgio functions are not namespaced or exported as t= hey are not >> part of the external API. >> >> Reviewed by: kevans >> Sponsored by: Rubicon Communications, LLC ("Netgate") >> Differential Revision: https://reviews.freebsd.org/D35261 >> --- >> lib/libnv/Makefile | 3 + >> lib/libnv/Version.map | 256 ++++++++++++++++++++++++++++++++++++++++= +++ >> sys/sys/cnv.h | 1 + >> sys/sys/dnv.h | 1 + >> sys/sys/nv.h | 1 + >> sys/sys/nv_namespace.h | 286 ++++++++++++++++++++++++++++++++++++++++= +++++++++ >> tools/build/Makefile | 2 +- >> 7 files changed, 549 insertions(+), 1 deletion(-) >> >> diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile >> index b13758931c4e..933dacb3eac6 100644 >> --- a/lib/libnv/Makefile >> +++ b/lib/libnv/Makefile >> @@ -8,6 +8,9 @@ PACKAGE=3D runtime >> LIB=3D nv >> SHLIB_MAJOR=3D 0 >> >> +VERSION_DEF=3D ${SRCTOP}/lib/libc/Versions.def >> +VERSION_MAP=3D ${.CURDIR}/Version.map >> + >> .PATH: ${SRCTOP}/sys/contrib/libnv ${SRCTOP}/sys/sys >> CFLAGS+=3D-I${.CURDIR} >> >> diff --git a/lib/libnv/Version.map b/lib/libnv/Version.map >> new file mode 100644 >> index 000000000000..98349c2356d3 > > IIRC this still needed the SHLIB_MAJOR bump (+ObsoleteFiles.inc for > the old version) that I had talked about because we're adding a symbol > map, but maybe someone else can clarify that. > I missed that comment in the review. Something like this then: https://re= views.freebsd.org/D35875 ? (I fixed the other remarks in the same commit.) Kristof
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EE442161-2AA4-43B2-A152-BC28969A5B95>