From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 30 14:19:31 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0343F16A405 for ; Tue, 30 Jan 2007 14:19:31 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.227]) by mx1.freebsd.org (Postfix) with ESMTP id B68FA13C471 for ; Tue, 30 Jan 2007 14:19:28 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1962041wxc for ; Tue, 30 Jan 2007 06:19:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=JmlAtoFsoeVXawvutcmrMYlQzhD92jvIJTvJboSZLZkxbR5j0hXA15QSUM7fgrF3AbU/zYUKkJTER9vmma5yP0lqbmERa9sjbR/tMJq6TDUsT9NO60IcO4tZzNZ26DLqGGEufK7/SQm5PyLkuJ2YSs2EvBOloQBPIkoANfWN9Is= Received: by 10.90.27.15 with SMTP id a15mr1085613aga.1170166767770; Tue, 30 Jan 2007 06:19:27 -0800 (PST) Received: from kan.dnsalias.net ( [24.34.98.164]) by mx.google.com with ESMTP id 20sm9640426agd.2007.01.30.06.19.26; Tue, 30 Jan 2007 06:19:26 -0800 (PST) Date: Tue, 30 Jan 2007 09:19:21 -0500 From: Alexander Kabaev To: takawata@jp.freebsd.org Message-ID: <20070130091921.76335b35@kan.dnsalias.net> In-Reply-To: <200701300900.l0U90kFA049949@sana.init-main.com> References: <200701300900.l0U90kFA049949@sana.init-main.com> X-Mailer: Claws Mail 2.7.0 (GTK+ 2.10.7; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_W5g5PTc83mm3EoINbX8hv_="; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-hackers@freebsd.org, nork@freebsd.org Subject: Re: some symbols of libc may be resolved by RTLD internal entities. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2007 14:19:31 -0000 --Sig_W5g5PTc83mm3EoINbX8hv_= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 30 Jan 2007 18:00:46 +0900 takawata@jp.freebsd.org wrote: > Hi,=20 >=20 > It seems that some symbols in libc is resolved by libc entities > which is linked with RTLD to implement it. >=20 > % nm -D ld-elf.so.1 > ... > 000158ec T mmap > 0000c4fc W mprotect > 0000c4dc W munmap > ... It doesn't. rtld is a special beast and its symbols availability to user programs is controlled by a special code in rtld. Look up static func_ptr_type exports[] in rtld.c and see how it is used. --=20 Alexander Kabaev P.S. The proper way to control symbol visibility is to use version script file when linking rtld-elf.so.1 in order to force all unintended symbols to local scope. exports array is there for historical reasons. --Sig_W5g5PTc83mm3EoINbX8hv_= Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFv1PtQ6z1jMm+XZYRArQmAJ9UR7VjIop6Nkq5TMUJOQqyyYXFnwCeLcqD R+lm1xbsbs4tUpCjKOxGfSQ= =4sdY -----END PGP SIGNATURE----- --Sig_W5g5PTc83mm3EoINbX8hv_=--