This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dl-load.c suggestion


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   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]