This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: dl-load.c suggestion
- To: Roland McGrath <roland@frob.com>
- Subject: Re: dl-load.c suggestion
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 22 May 1998 14:21:00 -0700
- Cc: GNU libc hacker <libc-hacker@gnu.org>
- References: <199805221945.PAA18936@baalperazim.frob.com>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
Roland McGrath <roland@frob.com> writes:
> In case someone feels like hacking, it might perform better to
> use mprotect instead of additional mmap's in _dl_map_object_from_fd
> for loading the segments after the first of a position-independent object.
You mean:
- mmap the entire file
- extract the load command
- restrict the initial mmap using mprotect to whatever the
first load command says. In case GNU ld is used the first
segment is the code, i.e., mapping the initial portion with
R-X would help to avoid touching this part of the memory
again
- load the segments 1 to N
??
-- Uli
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------