]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r237058:
authorkib <kib@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 28 Jun 2012 14:13:45 +0000 (14:13 +0000)
committerkib <kib@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 28 Jun 2012 14:13:45 +0000 (14:13 +0000)
commit508cb62d349b97cf5ff8e03478f4eb024ba33010
treedd28e541c2b8dd7bf46bcff38eaaa346f223b245
parentd4bd5b073a837ce7b5ae43523015dacd86fa0702
MFC r237058:
Eliminate the static buffer used to read the first page of the mapped
object, and eliminate the pread(2) call as well. Mmap the first
page of the object temporaly, and unmap it on error or last use.
Potentially, this leaves one-page gap between succeeding dlopen(3),
but there are other mmap(2) consumers as well.

Fix several cases were the whole mapping of the object leaked on error.

Use MAP_PREFAULT_READ for mmap(2) calls which map real object pages

git-svn-id: svn://svn.freebsd.org/base/stable/9@237712 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
libexec/rtld-elf/map_object.c