some symbols of libc may be resolved by RTLD internal entities.
Alexander Kabaev
kabaev at gmail.com
Tue Jan 30 14:19:31 UTC 2007
On Tue, 30 Jan 2007 18:00:46 +0900
takawata at jp.freebsd.org wrote:
> Hi,
>
> It seems that some symbols in libc is resolved by libc entities
> which is linked with RTLD to implement it.
>
> % 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.
--
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070130/f8b8c06b/signature.pgp
More information about the freebsd-hackers
mailing list