Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jan 2007 09:19:21 -0500
From:      Alexander Kabaev <kabaev@gmail.com>
To:        takawata@jp.freebsd.org
Cc:        freebsd-hackers@freebsd.org, nork@freebsd.org
Subject:   Re: some symbols of libc may be resolved by RTLD internal entities.
Message-ID:  <20070130091921.76335b35@kan.dnsalias.net>
In-Reply-To: <200701300900.l0U90kFA049949@sana.init-main.com>
References:  <200701300900.l0U90kFA049949@sana.init-main.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--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_=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070130091921.76335b35>