From owner-cvs-all@FreeBSD.ORG Wed May 28 13:17:55 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2EE91065671 for ; Wed, 28 May 2008 13:17:55 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6B58FC22 for ; Wed, 28 May 2008 13:17:55 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by wa-out-1112.google.com with SMTP id j4so3008303wah.3 for ; Wed, 28 May 2008 06:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; bh=zrne29ZZe7xGq/Xng7Oijjl/B0/3GGmK8zc0H2IgnPw=; b=SNyKuLDpno6p7Krc9olh9hgrtT7SgFOAMbiTwkdrIbh3G7Dco96NSFkjWtdWNr5/9c+em9d1KbJZAnYWrfB2wQjis8xT95CbFxRtFnaLkkCpsGMGNz+4SC9xdZ1mwpYMn/fVWbuUwXiPQO0qCbVeoJTtK8xGn6nAUHLkUdtoI2s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=PRTsUNL/dAm7N3Xi1O9TVPe1Fnbysl7ULzo1l+PdcW383l700g1wp4jjxmel7cCmrkvF+BSKwIsBNm17gN9As/ip0XhhRRe0ZuMzQRkoeBPNgyVDTuI37kNhtDoNeYGbIs1llSZLfFAYe6A69v4rQQLQfk3hxdDxXxW30D8Iu1U= Received: by 10.115.77.1 with SMTP id e1mr2504855wal.208.1211980675130; Wed, 28 May 2008 06:17:55 -0700 (PDT) Received: from kan.dnsalias.net ( [24.218.183.247]) by mx.google.com with ESMTPS id g7sm1726685wra.16.2008.05.28.06.17.50 (version=SSLv3 cipher=RC4-MD5); Wed, 28 May 2008 06:17:52 -0700 (PDT) Date: Wed, 28 May 2008 09:17:45 -0400 From: Alexander Kabaev To: Xin LI Message-ID: <20080528091745.465f37b4@kan.dnsalias.net> In-Reply-To: <200805272004.m4RK4SZt029194@repoman.freebsd.org> References: <200805272004.m4RK4SZt029194@repoman.freebsd.org> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.9; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/WTQqJjfurfA8NDh_2uWi8IK"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/include string.h src/lib/libc/string Makefile.inc memchr.3 memrchr.c src/sys/sys param.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2008 13:17:56 -0000 --Sig_/WTQqJjfurfA8NDh_2uWi8IK Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 27 May 2008 20:04:28 +0000 (UTC) Xin LI wrote: > delphij 2008-05-27 20:04:27 UTC >=20 > FreeBSD src repository >=20 > Modified files: (Branch: RELENG_6) > include string.h=20 > lib/libc/string Makefile.inc memchr.3=20 > sys/sys param.h=20 > Added files: (Branch: RELENG_6) > lib/libc/string memrchr.c=20 > Log: > MFC: Add memrchr(3). > =20 > Obtained from: OpenBSD > =20 > Revision Changes Path > 1.21.2.2 +1 -0 src/include/string.h > 1.34.8.2 +2 -1 src/lib/libc/string/Makefile.inc > 1.7.14.3 +28 -3 src/lib/libc/string/memchr.3 > 1.1.4.1 +40 -0 src/lib/libc/string/memrchr.c (new) > http://cvsweb.FreeBSD.org/src/lib/libc/string/memrchr.c?rev=3D1.1.4.1&con= tent-type=3Dtext/plain > 1.244.2.37 +1 -1 src/sys/sys/param.h >=20 > http://cvsweb.FreeBSD.org/src/include/string.h.diff?r1=3D1.21.2.1&r2=3D1.= 21.2.2 > http://cvsweb.FreeBSD.org/src/lib/libc/string/Makefile.inc.diff?r1=3D1.34= .8.1&r2=3D1.34.8.2 > http://cvsweb.FreeBSD.org/src/lib/libc/string/memchr.3.diff?r1=3D1.7.14.2= &r2=3D1.7.14.3 > http://cvsweb.FreeBSD.org/src/sys/sys/param.h.diff?r1=3D1.244.2.36&r2=3D1= .244.2.37 There are two levels of symbol versions checking:=20 1. Up-front checking of version name. When binary starts, rtld checks that all versions it was compiled against are provided by the dynamically loaded libraries. I.e. if libc.so.7:FBSD_1.1 is recorded as a requirement in binary and given libc.so.7 does not have that version, the binary execution is terminated right on the spot. The assumption here is that if version FOO is claimed to be provided by the library then _all_ symbols@FOO binary might need are present. This is the level of symbol versions checking Solaris provides. Linux goes a bit further: 2. Per-symbol versions. In addition to the above, ld encodes required version of each undefined symbol in a binary and uses (name, version) pair to resolve undefined references as opposed to using only the symbol name. This allows for several versions of the same symbol to exist within the binary, i.e. something like read@FOO1 and read@FOO2 are now possible. Your changes broke assumption in 1. To do it 100% correctly, we probably need to introduce a side version for memchr, something like memrchr@@FBSD_1.0a in stable branch and provide a compatibility alias memrchr@FBSD_1.0a for it in -current at the same time. libc.so.7 from RELENG_7 will have: memrchr@@FBSD_1.0a libc.so.7 from -current then will have: memrchr@@FBSD_1.1 memrchr@FBSD_1.0a -> memrchr@@FBSD_1.1 -- Alexander Kabaev --Sig_/WTQqJjfurfA8NDh_2uWi8IK Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFIPVt5Q6z1jMm+XZYRAp8aAKCJNuVbjM+hOtjxRwye5doTyCUAcwCgnuYc xxOKCBmkGLFUsUNF368NJZ0= =s8AH -----END PGP SIGNATURE----- --Sig_/WTQqJjfurfA8NDh_2uWi8IK--